|
3 | 3 | import static com.onthegomap.planetiler.TestUtils.newPolygon; |
4 | 4 |
|
5 | 5 | import com.onthegomap.planetiler.reader.SimpleFeature; |
| 6 | +import com.protomaps.basemap.Basemap; |
6 | 7 | import java.util.HashMap; |
7 | 8 | import java.util.List; |
8 | 9 | import java.util.Map; |
@@ -60,4 +61,95 @@ void testNe() { |
60 | 61 | )) |
61 | 62 | ); |
62 | 63 | } |
| 64 | + |
| 65 | + @Test |
| 66 | + void testOvertureGrass() { |
| 67 | + assertFeatures(7, |
| 68 | + List.of(Map.of("kind", "grassland")), |
| 69 | + process(SimpleFeature.create( |
| 70 | + newPolygon(0, 0, 0, 1, 1, 1, 0, 0), |
| 71 | + new HashMap<>(Map.of("type", "land_cover", "subtype", "grass")), |
| 72 | + Basemap.SRC_OVERTURE, |
| 73 | + null, |
| 74 | + 0 |
| 75 | + ))); |
| 76 | + } |
| 77 | + |
| 78 | + @Test |
| 79 | + void testOvertureBarren() { |
| 80 | + assertFeatures(7, |
| 81 | + List.of(Map.of("kind", "barren")), |
| 82 | + process(SimpleFeature.create( |
| 83 | + newPolygon(0, 0, 0, 1, 1, 1, 0, 0), |
| 84 | + new HashMap<>(Map.of("type", "land_cover", "subtype", "barren")), |
| 85 | + Basemap.SRC_OVERTURE, |
| 86 | + null, |
| 87 | + 0 |
| 88 | + ))); |
| 89 | + } |
| 90 | + |
| 91 | + @Test |
| 92 | + void testOvertureUrban() { |
| 93 | + assertFeatures(7, |
| 94 | + List.of(Map.of("kind", "urban_area")), |
| 95 | + process(SimpleFeature.create( |
| 96 | + newPolygon(0, 0, 0, 1, 1, 1, 0, 0), |
| 97 | + new HashMap<>(Map.of("type", "land_cover", "subtype", "urban")), |
| 98 | + Basemap.SRC_OVERTURE, |
| 99 | + null, |
| 100 | + 0 |
| 101 | + ))); |
| 102 | + } |
| 103 | + |
| 104 | + @Test |
| 105 | + void testOvertureCrop() { |
| 106 | + assertFeatures(7, |
| 107 | + List.of(Map.of("kind", "farmland")), |
| 108 | + process(SimpleFeature.create( |
| 109 | + newPolygon(0, 0, 0, 1, 1, 1, 0, 0), |
| 110 | + new HashMap<>(Map.of("type", "land_cover", "subtype", "crop")), |
| 111 | + Basemap.SRC_OVERTURE, |
| 112 | + null, |
| 113 | + 0 |
| 114 | + ))); |
| 115 | + } |
| 116 | + |
| 117 | + @Test |
| 118 | + void testOvertureSnow() { |
| 119 | + assertFeatures(7, |
| 120 | + List.of(Map.of("kind", "glacier")), |
| 121 | + process(SimpleFeature.create( |
| 122 | + newPolygon(0, 0, 0, 1, 1, 1, 0, 0), |
| 123 | + new HashMap<>(Map.of("type", "land_cover", "subtype", "snow")), |
| 124 | + Basemap.SRC_OVERTURE, |
| 125 | + null, |
| 126 | + 0 |
| 127 | + ))); |
| 128 | + } |
| 129 | + |
| 130 | + @Test |
| 131 | + void testOvertureShrub() { |
| 132 | + assertFeatures(7, |
| 133 | + List.of(Map.of("kind", "scrub")), |
| 134 | + process(SimpleFeature.create( |
| 135 | + newPolygon(0, 0, 0, 1, 1, 1, 0, 0), |
| 136 | + new HashMap<>(Map.of("type", "land_cover", "subtype", "shrub")), |
| 137 | + Basemap.SRC_OVERTURE, |
| 138 | + null, |
| 139 | + 0 |
| 140 | + ))); |
| 141 | + } |
| 142 | + |
| 143 | + @Test |
| 144 | + void testOvertureForest() { |
| 145 | + assertFeatures(7, |
| 146 | + List.of(Map.of("kind", "forest")), |
| 147 | + process(SimpleFeature.create( |
| 148 | + newPolygon(0, 0, 0, 1, 1, 1, 0, 0), |
| 149 | + new HashMap<>(Map.of("type", "land_cover", "subtype", "forest")), |
| 150 | + Basemap.SRC_OVERTURE, |
| 151 | + null, |
| 152 | + 0 |
| 153 | + ))); |
| 154 | + } |
63 | 155 | } |
0 commit comments