Skip to content

Commit

Permalink
Show lake names earlier by using higher simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
vycius committed May 6, 2024
1 parent f9100e3 commit c986032
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vector/src/main/java/lt/lrv/basemap/layers/WaterName.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void processFeature(SourceFeature sf, FeatureCollector features) {
switch (code) {
case "hd3", "hd4", "hd9" -> {
if (area >= 5_000_000) {
addWaterCenterLine(FieldValues.CLASS_LAKE, 12, sf, features);
addWaterCenterLine(FieldValues.CLASS_LAKE, 11, sf, features);
} else if (area >= 500_000) {
addWaterCenterLine(FieldValues.CLASS_LAKE, 13, sf, features);
} else {
Expand Down Expand Up @@ -69,10 +69,12 @@ void addWaterCenterLine(String clazz, int minZoom, SourceFeature sf, FeatureColl
}

public List<VectorTile.Feature> postProcess(int zoom, List<VectorTile.Feature> items) {
var tolerance = zoom < 14 ? 1 : config.tolerance(zoom);

return FeatureMerge.mergeLineStrings(
items,
config.minFeatureSize(zoom),
config.tolerance(zoom),
tolerance,
BUFFER_SIZE
);
}
Expand Down

0 comments on commit c986032

Please sign in to comment.