From a01c01b79da84b3dbd3a35bc072630f89a4246c3 Mon Sep 17 00:00:00 2001 From: Eike Send Date: Thu, 26 Oct 2023 22:22:26 +0200 Subject: [PATCH 1/7] Use station tag value in pmap:kind_detail to differentiate subway / light_rail / train stations --- tiles/src/main/java/com/protomaps/basemap/layers/Pois.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java b/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java index ba1ed6f8..d0553a2e 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java @@ -204,6 +204,8 @@ public void processFeature(SourceFeature sf, FeatureCollector features) { kindDetail = sf.getString("religion"); } else if (sf.hasTag("sport")) { kindDetail = sf.getString("sport"); + } else if (sf.hasTag("station")) { + kindDetail = sf.getString("station"); } // try first for polygon -> point representations From d1ff93e73973f8bb0dc68e22ed9e65939ce1f994 Mon Sep 17 00:00:00 2001 From: Eike Send Date: Thu, 26 Oct 2023 22:29:58 +0200 Subject: [PATCH 2/7] Include tram stops in POIs as well --- tiles/src/main/java/com/protomaps/basemap/layers/Pois.java | 1 + 1 file changed, 1 insertion(+) diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java b/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java index d0553a2e..b9b81fe1 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java @@ -51,6 +51,7 @@ public void processFeature(SourceFeature sf, FeatureCollector features) { sf.hasTag("leisure") || sf.hasTag("natural", "beach") || sf.hasTag("railway", "station") || + sf.hasTag("railway", "tram_stop") || sf.hasTag("shop") || sf.hasTag("tourism") && (!sf.hasTag("historic", "district")))) { From 6c708396617c6359e3c30d32a220e26d347d3639 Mon Sep 17 00:00:00 2001 From: Eike Send Date: Sun, 29 Oct 2023 22:31:08 +0100 Subject: [PATCH 3/7] Show train station at 13, subway and light rail station at 14 and tram_stop at 16 --- .../src/main/java/com/protomaps/basemap/layers/Pois.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java b/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java index b9b81fe1..07947ba5 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java @@ -208,6 +208,14 @@ public void processFeature(SourceFeature sf, FeatureCollector features) { } else if (sf.hasTag("station")) { kindDetail = sf.getString("station"); } + + if (sf.hasTag("railway", "station") && (!sf.hasTag("station") || sf.hasTag("station", "train"))) { + minZoom = 13; + if (sf.hasTag("station", "subway", "light_rail")) { + minZoom = 14; + } else if (sf.hasTag("railway", "tram_stop")) { + minZoom = 16; + } // try first for polygon -> point representations if (sf.canBePolygon() && sf.hasTag("name") && sf.getString("name") != null) { From 06e2387c5f07edfe815c7ca7ad79584a70bbdee3 Mon Sep 17 00:00:00 2001 From: Eike Send Date: Sun, 29 Oct 2023 22:50:14 +0100 Subject: [PATCH 4/7] Add "railway: halt" and set minZoom to 14 --- tiles/src/main/java/com/protomaps/basemap/layers/Pois.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java b/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java index 07947ba5..c913bf79 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java @@ -52,6 +52,7 @@ public void processFeature(SourceFeature sf, FeatureCollector features) { sf.hasTag("natural", "beach") || sf.hasTag("railway", "station") || sf.hasTag("railway", "tram_stop") || + sf.hasTag("railway", "halt") || sf.hasTag("shop") || sf.hasTag("tourism") && (!sf.hasTag("historic", "district")))) { @@ -211,7 +212,7 @@ public void processFeature(SourceFeature sf, FeatureCollector features) { if (sf.hasTag("railway", "station") && (!sf.hasTag("station") || sf.hasTag("station", "train"))) { minZoom = 13; - if (sf.hasTag("station", "subway", "light_rail")) { + } else if (sf.hasTag("station", "subway", "light_rail") || sf.hasTag("railway", "halt")) { minZoom = 14; } else if (sf.hasTag("railway", "tram_stop")) { minZoom = 16; From 8df8aa5c9ce6d54ad2d7b68f4288b8578ae1ea74 Mon Sep 17 00:00:00 2001 From: Eike Send Date: Sat, 4 Nov 2023 17:24:11 +0100 Subject: [PATCH 5/7] Apply spotless maven --- tiles/src/main/java/com/protomaps/basemap/layers/Pois.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java b/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java index abe5a5bb..a56afa1c 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java @@ -215,7 +215,8 @@ public void processFeature(SourceFeature sf, FeatureCollector features) { kindDetail = sf.getString("station"); } - if (sf.hasTag("railway", "station") && (!sf.hasTag("station") || sf.hasTag("station", "train", "light_rail", "subway"))) { + if (sf.hasTag("railway", "station") && + (!sf.hasTag("station") || sf.hasTag("station", "train", "light_rail", "subway"))) { minZoom = 10; } else if (sf.hasTag("railway", "halt", "tram_stop")) { minZoom = 16; From 51525aa39e0cda319f3c80d614ccd86841ff6149 Mon Sep 17 00:00:00 2001 From: Eike Send Date: Sat, 4 Nov 2023 18:12:36 +0100 Subject: [PATCH 6/7] Apply maven spotless again : D --- tiles/src/main/java/com/protomaps/basemap/layers/Pois.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java b/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java index a56afa1c..aebf8c91 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java @@ -215,7 +215,7 @@ public void processFeature(SourceFeature sf, FeatureCollector features) { kindDetail = sf.getString("station"); } - if (sf.hasTag("railway", "station") && + if (sf.hasTag("railway", "station") && (!sf.hasTag("station") || sf.hasTag("station", "train", "light_rail", "subway"))) { minZoom = 10; } else if (sf.hasTag("railway", "halt", "tram_stop")) { From 03bf500f82c9a8d217d4f996dff89aea60101821 Mon Sep 17 00:00:00 2001 From: Eike Send Date: Sat, 4 Nov 2023 18:15:35 +0100 Subject: [PATCH 7/7] remove trailing spaces --- tiles/src/main/java/com/protomaps/basemap/layers/Pois.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java b/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java index aebf8c91..4e971d9c 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Pois.java @@ -214,7 +214,7 @@ public void processFeature(SourceFeature sf, FeatureCollector features) { } else if (sf.hasTag("station")) { kindDetail = sf.getString("station"); } - + if (sf.hasTag("railway", "station") && (!sf.hasTag("station") || sf.hasTag("station", "train", "light_rail", "subway"))) { minZoom = 10;