From 64d3b23ee1cc39a3320ca6fc29ecd41e4a8fe84e Mon Sep 17 00:00:00 2001 From: Mike Barry Date: Sat, 23 Oct 2021 06:17:18 -0400 Subject: [PATCH 1/2] Change transportation name defaults --- PLANET.md | 2 +- config-example.properties | 10 +++++----- flatmap-basemap/README.md | 9 +++++++++ .../flatmap/basemap/layers/Transportation.java | 2 +- .../flatmap/basemap/layers/TransportationName.java | 4 ++-- .../onthegomap/flatmap/basemap/BasemapTest.java | 2 +- .../flatmap/basemap/layers/TransportationTest.java | 14 +++++++------- 7 files changed, 26 insertions(+), 17 deletions(-) diff --git a/PLANET.md b/PLANET.md index 4b858cc9e8..60b71dd0f7 100644 --- a/PLANET.md +++ b/PLANET.md @@ -68,7 +68,7 @@ java -Xmx100g -Xms100g \ --download-threads=10 --download-chunk-size-mb=1000 \ `# Also download name translations from wikidata` \ --fetch-wikidata \ - `# Personal preference overrides to default OpenMapTiles schema` \ + `# Personal preference overrides to OpenMapTiles (these are default now)` \ --transportation-name-brunnel=false --transportation-z13-paths=true \ --mbtiles=output.mbtiles \ --nodemap-type=sparsearray --nodemap-storage=ram 2>&1 | tee logs.txt diff --git a/config-example.properties b/config-example.properties index 4528d5a87f..db7316771c 100644 --- a/config-example.properties +++ b/config-example.properties @@ -126,17 +126,17 @@ # boundary_country_names=false #### "transportation"/"transportation_name" layer -# Include paths and path names at z13 (default is only 14) -# transportation_z13_paths=true +# Set minimum zoom for paths and path names to z14 (default is only 13) +# transportation_z13_paths=false # We attempt to merge any road name lines with the same attributes and touching endpoints, # but any 3-way nodes and intersections prevent line merging. # To prevent merging from combining onramps/offramps or opposite directions of divided highways, set: # transportation_name_limit_merge=true -# To exclude "brunnel" attribute from road name line features so that tunnels and bridges don't -# prevent merging: -# transportation_name_brunnel=false +# By default, the "brunnel" attribute is excluded from from road name line features so that tunnels +# and bridges don't prevent merging. To include "brunnel" tag: +# transportation_name_brunnel=true # To set a shorter length limit for road name lines so you can render a shield, but not the full name: # transportation_name_size_for_shield=true diff --git a/flatmap-basemap/README.md b/flatmap-basemap/README.md index 7eba8e7837..e6936fcd4e 100644 --- a/flatmap-basemap/README.md +++ b/flatmap-basemap/README.md @@ -3,6 +3,15 @@ This basemap profile is based on [OpenMapTiles](https://github.com/openmaptiles/openmaptiles) v3.12.2. See [README.md](../README.md) in the parent directory for instructions on how to run. +## Differences from OpenMapTiles + +- `transportation_name` layer does not abbreviate road names yet +- `poi` layer missing the `agg_stop` tag +- Paths are visible at z13 in `transportation` and `transportation_name` layers instead of z14 in OpenMapTiles, to + revert this behavior set `--transportation-z13-paths=false` +- `brunnel` tag is excluded from `transportation_name` layer to avoid breaking apart long `transportation_name` + lines, to revert this behavior set `--transportation-name-brunnel=true` + ## Code Layout [Generate.java](./src/main/java/com/onthegomap/flatmap/basemap/Generate.java) generates code in diff --git a/flatmap-basemap/src/main/java/com/onthegomap/flatmap/basemap/layers/Transportation.java b/flatmap-basemap/src/main/java/com/onthegomap/flatmap/basemap/layers/Transportation.java index 2f8929f41f..c9d016ef2b 100644 --- a/flatmap-basemap/src/main/java/com/onthegomap/flatmap/basemap/layers/Transportation.java +++ b/flatmap-basemap/src/main/java/com/onthegomap/flatmap/basemap/layers/Transportation.java @@ -123,7 +123,7 @@ public Transportation(Translations translations, FlatmapConfig config, Stats sta boolean z13Paths = config.arguments().getBoolean( "transportation_z13_paths", "transportation(_name) layer: show paths on z13", - false + true ); MINZOOMS = Map.of( FieldValues.CLASS_TRACK, 14, diff --git a/flatmap-basemap/src/main/java/com/onthegomap/flatmap/basemap/layers/TransportationName.java b/flatmap-basemap/src/main/java/com/onthegomap/flatmap/basemap/layers/TransportationName.java index ad91c9d048..fb97c21ce0 100644 --- a/flatmap-basemap/src/main/java/com/onthegomap/flatmap/basemap/layers/TransportationName.java +++ b/flatmap-basemap/src/main/java/com/onthegomap/flatmap/basemap/layers/TransportationName.java @@ -142,7 +142,7 @@ public TransportationName(Translations translations, FlatmapConfig config, Stats this.brunnel = config.arguments().getBoolean( "transportation_name_brunnel", "transportation_name layer: set to false to omit brunnel and help merge long highways", - true + false ); this.sizeForShield = config.arguments().getBoolean( "transportation_name_size_for_shield", @@ -157,7 +157,7 @@ public TransportationName(Translations translations, FlatmapConfig config, Stats boolean z13Paths = config.arguments().getBoolean( "transportation_z13_paths", "transportation(_name) layer: show paths on z13", - false + true ); MINZOOMS = Map.of( FieldValues.CLASS_TRACK, 14, diff --git a/flatmap-basemap/src/test/java/com/onthegomap/flatmap/basemap/BasemapTest.java b/flatmap-basemap/src/test/java/com/onthegomap/flatmap/basemap/BasemapTest.java index 0c756e4132..eb6a9cff03 100644 --- a/flatmap-basemap/src/test/java/com/onthegomap/flatmap/basemap/BasemapTest.java +++ b/flatmap-basemap/src/test/java/com/onthegomap/flatmap/basemap/BasemapTest.java @@ -200,7 +200,7 @@ public void testTransportationName() { assertNumFeatures("transportation_name", Map.of( "name", "Boulevard du Larvotto", "class", "primary" - ), 14, 22, LineString.class); + ), 14, 12, LineString.class); } @Test diff --git a/flatmap-basemap/src/test/java/com/onthegomap/flatmap/basemap/layers/TransportationTest.java b/flatmap-basemap/src/test/java/com/onthegomap/flatmap/basemap/layers/TransportationTest.java index adda5da00c..a8b5253f24 100644 --- a/flatmap-basemap/src/test/java/com/onthegomap/flatmap/basemap/layers/TransportationTest.java +++ b/flatmap-basemap/src/test/java/com/onthegomap/flatmap/basemap/layers/TransportationTest.java @@ -37,7 +37,7 @@ public void testNamedFootway() { "name", "", "_buffer", 4d, "_minpixelsize", 0d, - "_minzoom", 14, + "_minzoom", 13, "_maxzoom", 14 ), Map.of( "_layer", "transportation_name", @@ -48,7 +48,7 @@ public void testNamedFootway() { "name_int", "Lagoon Path", "name:latin", "Lagoon Path", "_minpixelsize", 0d, - "_minzoom", 14, + "_minzoom", 13, "_maxzoom", 14 )), result); assertFeatures(13, List.of(Map.of( @@ -143,7 +143,7 @@ public void testInterstateMotorway() { "ref", "90", "ref_length", 2, "network", "us-interstate", - "brunnel", "bridge", + "brunnel", "", "_minzoom", 6 )), features); @@ -166,7 +166,7 @@ public void testInterstateMotorway() { "ref", "90", "ref_length", 2, "network", "us-interstate", - "brunnel", "bridge", + "brunnel", "", "_minzoom", 6 )), features); } @@ -184,7 +184,7 @@ public void testPrimaryRoadConstruction() { "_layer", "transportation_name", "name", "North Washington Street", "class", "primary_construction", - "brunnel", "bridge", + "brunnel", "", "_minzoom", 12 )), process(lineFeature(Map.of( "highway", "construction", @@ -239,13 +239,13 @@ public void testMountainBikeTrail() { "mtb_scale", "4", "surface", "unpaved", "bicycle", "yes", - "_minzoom", 14 + "_minzoom", 13 ), Map.of( "_layer", "transportation_name", "class", "path", "subclass", "path", "name", "Path name", - "_minzoom", 14 + "_minzoom", 13 )), process(lineFeature(Map.of( "highway", "path", "mtb:scale", "4", From 4287156185b9ff57ef5679e29eae2e6c1b6e2aee Mon Sep 17 00:00:00 2001 From: Mike Barry Date: Sat, 23 Oct 2021 06:23:28 -0400 Subject: [PATCH 2/2] [skip ci] wording tweaks --- PLANET.md | 2 +- config-example.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PLANET.md b/PLANET.md index 60b71dd0f7..7587ff8b14 100644 --- a/PLANET.md +++ b/PLANET.md @@ -68,7 +68,7 @@ java -Xmx100g -Xms100g \ --download-threads=10 --download-chunk-size-mb=1000 \ `# Also download name translations from wikidata` \ --fetch-wikidata \ - `# Personal preference overrides to OpenMapTiles (these are default now)` \ + `# Personal preference overrides from OpenMapTiles schema (these are default now)` \ --transportation-name-brunnel=false --transportation-z13-paths=true \ --mbtiles=output.mbtiles \ --nodemap-type=sparsearray --nodemap-storage=ram 2>&1 | tee logs.txt diff --git a/config-example.properties b/config-example.properties index db7316771c..d00d84f9b1 100644 --- a/config-example.properties +++ b/config-example.properties @@ -126,7 +126,7 @@ # boundary_country_names=false #### "transportation"/"transportation_name" layer -# Set minimum zoom for paths and path names to z14 (default is only 13) +# Set minimum zoom for paths and path names to z14 (default is 13) # transportation_z13_paths=false # We attempt to merge any road name lines with the same attributes and touching endpoints,