Skip to content

Commit

Permalink
Reduce buffer on transportation_name layer (openmaptiles#165)
Browse files Browse the repository at this point in the history
reduce buffer on transportation_name layer
  • Loading branch information
msbarry authored and ofalvai committed Jul 12, 2024
1 parent afd890a commit 2228502
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/main/java/org/openmaptiles/layers/TransportationName.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,6 @@ public class TransportationName implements
.put(9, 8_000)
.put(10, 4_000)
.put(11, 2_000);
private static final ZoomFunction<Number> BUFFER_PIXEL_OVERRIDES =
ZoomFunction.fromMaxZoomThresholds(Map.of(
13, 256,
6, 256
));
private final boolean brunnel;
private final boolean sizeForShield;
private final boolean limitMerge;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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())
Expand All @@ -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)
Expand Down

0 comments on commit 2228502

Please sign in to comment.