planetiler/planetiler-basemap/src/test/java/com/onthegomap/planetiler/basemap/layers/AerowayTest.java

93 wiersze
2.1 KiB
Java
Czysty Zwykły widok Historia

package com.onthegomap.planetiler.basemap.layers;
2021-06-23 01:46:42 +00:00
import java.util.List;
import java.util.Map;
import org.junit.jupiter.api.Test;
2022-04-23 10:36:24 +00:00
class AerowayTest extends AbstractLayerTest {
2021-06-23 01:46:42 +00:00
@Test
2022-04-23 10:36:24 +00:00
void aerowayGate() {
2021-06-23 01:46:42 +00:00
assertFeatures(14, List.of(Map.of(
"class", "gate",
"ref", "123",
"_layer", "aeroway",
"_type", "point",
"_minzoom", 14,
"_maxzoom", 14,
"_buffer", 4d
)), process(pointFeature(Map.of(
"aeroway", "gate",
"ref", "123"
))));
assertFeatures(14, List.of(), process(lineFeature(Map.of(
"aeroway", "gate"
))));
assertFeatures(14, List.of(), process(polygonFeature(Map.of(
"aeroway", "gate"
))));
}
@Test
2022-04-23 10:36:24 +00:00
void aerowayLine() {
2021-06-23 01:46:42 +00:00
assertFeatures(14, List.of(Map.of(
"class", "runway",
"ref", "123",
"_layer", "aeroway",
"_type", "line",
"_minzoom", 10,
"_maxzoom", 14,
"_buffer", 4d
)), process(lineFeature(Map.of(
"aeroway", "runway",
"ref", "123"
))));
assertFeatures(14, List.of(), process(pointFeature(Map.of(
"aeroway", "runway"
))));
}
@Test
2022-04-23 10:36:24 +00:00
void aerowayPolygon() {
2021-06-23 01:46:42 +00:00
assertFeatures(14, List.of(Map.of(
"class", "runway",
"ref", "123",
"_layer", "aeroway",
"_type", "polygon",
"_minzoom", 10,
"_maxzoom", 14,
"_buffer", 4d
)), process(polygonFeature(Map.of(
"aeroway", "runway",
"ref", "123"
))));
assertFeatures(14, List.of(Map.of(
"class", "runway",
"ref", "123",
"_layer", "aeroway",
"_type", "polygon"
)), process(polygonFeature(Map.of(
"area:aeroway", "runway",
"ref", "123"
))));
assertFeatures(14, List.of(Map.of(
"class", "heliport",
"ref", "123",
"_layer", "aeroway",
"_type", "polygon"
)), process(polygonFeature(Map.of(
"aeroway", "heliport",
"ref", "123"
))));
assertFeatures(14, List.of(), process(lineFeature(Map.of(
"aeroway", "heliport"
))));
assertFeatures(14, List.of(), process(pointFeature(Map.of(
"aeroway", "heliport"
))));
}
}