From f4acb87e0da5ac31525dd69c90950c648bf1d50b Mon Sep 17 00:00:00 2001 From: Brandon Liu Date: Thu, 2 Jul 2026 14:35:07 -0400 Subject: [PATCH] [FEATURE] Add prominence score to divisions theme * Assign features to tile zoom based on: ((100 - prominence) / 5)+1 * All features are included at zoom 10 Resolves #96 Signed-off-by: Brandon Liu --- profiles/Divisions.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/profiles/Divisions.java b/profiles/Divisions.java index 39d7f6b..3813ca1 100644 --- a/profiles/Divisions.java +++ b/profiles/Divisions.java @@ -18,7 +18,19 @@ public void processFeature(SourceFeature source, FeatureCollector features) { }; if (layer.equals("division")) { var point = features.point(layer); + + // extract the cartography.prominence value + // as the @prominence tag + if (source.hasTag("cartography")) { + var cartography = source.getStruct("cartography"); + var prominence = source.getStruct("cartography").get("prominence"); + point.setSortKeyDescending(prominence.asInt()); + // depending on the prominence, boost the minzoom higher + minzoom = Math.min((int)Math.floor((100.0 - prominence.asDouble()) / 5.0)+1,10); + point.setAttr("@prominence", prominence); + } point.setMinZoom(minzoom); + OvertureProfile.addFullTags(source, point, minzoom); } else if (layer.equals("division_boundary")) { var line = features.line(layer);