Optimize tile sizes (#112)

This commit is contained in:
Michael Barry
2023-09-25 05:10:51 -04:00
committed by GitHub
parent 210c8fee67
commit fef4424bc2
10 changed files with 72 additions and 24 deletions

View File

@@ -178,7 +178,10 @@ public class Building implements
@Override
public List<VectorTile.Feature> postProcess(int zoom,
List<VectorTile.Feature> items) throws GeometryException {
return (mergeZ13Buildings && zoom == 13) ? FeatureMerge.mergeNearbyPolygons(items, 4, 4, 0.5, 0.5) : items;
return (mergeZ13Buildings && zoom == 13) ?
FeatureMerge.mergeNearbyPolygons(items, 4, 4, 0.5, 0.5) :
// reduces the size of some heavy z14 tiles with many small buildings by 60% or more
FeatureMerge.mergeMultiPolygon(items);
}
private record BuildingRelationInfo(long id) implements OsmRelationInfo {