Skip to content

Commit 56683b3

Browse files
committed
Simplify code and remove area filter for water features [#198]
We can't do any pre-filtering of water areas, because sometimes they are parts of linear features. Let the polygon merge routine do its work, and change the threshold to 1.0 pixels.
1 parent f0e1cc0 commit 56683b3

File tree

1 file changed

+1
-11
lines changed
  • tiles/src/main/java/com/protomaps/basemap/layers

1 file changed

+1
-11
lines changed

tiles/src/main/java/com/protomaps/basemap/layers/Water.java

+1-11
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public void processFeature(SourceFeature sf, FeatureCollector features) {
144144
.setAttr("water", sf.getString("water"))
145145
.setAttr("waterway", sf.getString("waterway"))
146146
.setZoomRange(6, 15)
147-
.setMinPixelSize(3.0)
147+
.setMinPixelSize(1.0)
148148
.setBufferPixels(8);
149149

150150
// Core Tilezen schema properties
@@ -168,16 +168,6 @@ public void processFeature(SourceFeature sf, FeatureCollector features) {
168168

169169
@Override
170170
public List<VectorTile.Feature> postProcess(int zoom, List<VectorTile.Feature> items) throws GeometryException {
171-
if (zoom == 15)
172-
return items;
173-
174-
int minArea = 400 / (4096 * 4096) * (256 * 256);
175-
if (zoom == 6)
176-
minArea = 600 / (4096 * 4096) * (256 * 256);
177-
else if (zoom <= 5)
178-
minArea = 800 / (4096 * 4096) * (256 * 256);
179-
items = Area.filterArea(items, minArea);
180-
181171
return FeatureMerge.mergeOverlappingPolygons(items, 1);
182172
}
183173
}

0 commit comments

Comments
 (0)