Revert "allow using label grid on lines and polygons too (#51)"

This reverts commit 1c622ffdfbdf8467fd7990794662b4521f42e61e.
This commit is contained in:
Mike Barry
2022-01-10 06:41:15 -05:00
parent e5577b5369
commit 8e49c0831c
4 changed files with 5 additions and 5 deletions

View File

@@ -100,7 +100,7 @@ public class MountainPeak implements
// any label grid squares which could lead to inconsistent label ranks for a feature // any label grid squares which could lead to inconsistent label ranks for a feature
// in adjacent tiles. postProcess() will remove anything outside the desired buffer. // in adjacent tiles. postProcess() will remove anything outside the desired buffer.
.setBufferPixels(100) .setBufferPixels(100)
.setLabelGridSizeAndLimit(13, 100, 5); .setPointLabelGridSizeAndLimit(13, 100, 5);
} }
} }

View File

@@ -115,7 +115,7 @@ public class Park implements
features.centroid(LAYER_NAME).setBufferPixels(256) features.centroid(LAYER_NAME).setBufferPixels(256)
.setAttr(Fields.CLASS, clazz) .setAttr(Fields.CLASS, clazz)
.putAttrs(LanguageUtils.getNames(element.source().tags(), translations)) .putAttrs(LanguageUtils.getNames(element.source().tags(), translations))
.setLabelGridPixelSize(14, 100) .setPointLabelGridPixelSize(14, 100)
.setSortKey(SortKey .setSortKey(SortKey
.orderByTruesFirst("national_park".equals(clazz)) .orderByTruesFirst("national_park".equals(clazz))
.thenByTruesFirst(element.source().hasTag("wikipedia") || element.source().hasTag("wikidata")) .thenByTruesFirst(element.source().hasTag("wikipedia") || element.source().hasTag("wikidata"))

View File

@@ -350,10 +350,10 @@ public class Place implements
.setAttr(Fields.RANK, rank) .setAttr(Fields.RANK, rank)
.setMinZoom(minzoom) .setMinZoom(minzoom)
.setSortKey(getSortKey(rank, placeType, element.population(), element.name())) .setSortKey(getSortKey(rank, placeType, element.population(), element.name()))
.setLabelGridPixelSize(12, 128); .setPointLabelGridPixelSize(12, 128);
if (rank == null) { if (rank == null) {
feature.setLabelGridLimit(LABEL_GRID_LIMITS); feature.setPointLabelGridLimit(LABEL_GRID_LIMITS);
} }
if ("2".equals(capital) || "yes".equals(capital)) { if ("2".equals(capital) || "yes".equals(capital)) {

View File

@@ -174,7 +174,7 @@ public class Poi implements
.setAttr(Fields.LEVEL, Parse.parseLongOrNull(element.source().getTag("level"))) .setAttr(Fields.LEVEL, Parse.parseLongOrNull(element.source().getTag("level")))
.setAttr(Fields.INDOOR, element.indoor() ? 1 : null) .setAttr(Fields.INDOOR, element.indoor() ? 1 : null)
.putAttrs(LanguageUtils.getNames(element.source().tags(), translations)) .putAttrs(LanguageUtils.getNames(element.source().tags(), translations))
.setLabelGridPixelSize(14, 64) .setPointLabelGridPixelSize(14, 64)
.setSortKey(rankOrder) .setSortKey(rankOrder)
.setMinZoom(minzoom(element.subclass(), element.mappingKey())); .setMinZoom(minzoom(element.subclass(), element.mappingKey()));
} }