From 36a66ba03339ce7024bba9f785dd0fc015821d56 Mon Sep 17 00:00:00 2001 From: Mike Barry Date: Thu, 2 May 2024 20:39:05 -0400 Subject: [PATCH] reduce buffer on transportation_name layer --- .../org/openmaptiles/layers/TransportationName.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/openmaptiles/layers/TransportationName.java b/src/main/java/org/openmaptiles/layers/TransportationName.java index 2ac9f400..2f82c2ec 100644 --- a/src/main/java/org/openmaptiles/layers/TransportationName.java +++ b/src/main/java/org/openmaptiles/layers/TransportationName.java @@ -113,11 +113,6 @@ public class TransportationName implements .put(9, 8_000) .put(10, 4_000) .put(11, 2_000); - private static final ZoomFunction BUFFER_PIXEL_OVERRIDES = - ZoomFunction.fromMaxZoomThresholds(Map.of( - 13, 256, - 6, 256 - )); private final boolean brunnel; private final boolean sizeForShield; private final boolean limitMerge; @@ -260,7 +255,7 @@ public void process(Tables.OsmHighwayLinestring element, FeatureCollector featur FeatureCollector.Feature feature = features.line(LAYER_NAME) .setBufferPixels(BUFFER_SIZE) - .setBufferPixelOverrides(BUFFER_PIXEL_OVERRIDES) + .setBufferPixelOverrides(MIN_LENGTH) // TODO abbreviate road names - can't port osml10n because it is AGPL .putAttrs(OmtLanguageUtils.getNames(element.source().tags(), translations)) .setAttr(Fields.REF, ref) @@ -321,7 +316,7 @@ public void process(Tables.OsmAerialwayLinestring element, FeatureCollector feat if (!nullOrEmpty(element.name())) { features.line(LAYER_NAME) .setBufferPixels(BUFFER_SIZE) - .setBufferPixelOverrides(BUFFER_PIXEL_OVERRIDES) + .setBufferPixelOverrides(MIN_LENGTH) .putAttrs(OmtLanguageUtils.getNames(element.source().tags(), translations)) .setAttr(Fields.CLASS, "aerialway") .setAttr(Fields.SUBCLASS, element.aerialway()) @@ -336,7 +331,7 @@ public void process(Tables.OsmShipwayLinestring element, FeatureCollector featur if (!nullOrEmpty(element.name())) { features.line(LAYER_NAME) .setBufferPixels(BUFFER_SIZE) - .setBufferPixelOverrides(BUFFER_PIXEL_OVERRIDES) + .setBufferPixelOverrides(MIN_LENGTH) .putAttrs(OmtLanguageUtils.getNames(element.source().tags(), translations)) .setAttr(Fields.CLASS, element.shipway()) .setMinPixelSize(0)