From c503042cd912b0bfdc43bcafc13dc9b9680d6e6e Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Sat, 23 Mar 2024 20:43:15 -0400 Subject: [PATCH 1/4] Support `portage` tag --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 317f34e..0a474b6 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,7 @@ planet-waterway-boatable.geojsons: planet-waterway.osm.pbf mv tmp.$@ $@ planet-waterway-canoeable.geojsons: planet-waterway.osm.pbf - osm-lump-ways -i $< -o tmp.$@ --min-length-m 100 --save-as-linestrings -f canoe∈yes,portage,permissive,designated,destination,customers,permit + osm-lump-ways -i $< -o tmp.$@ --min-length-m 100 --save-as-linestrings -f canoe∈yes,portage,permissive,designated,destination,customers,permit -f portage∈yes,permissive,designated,destination,customers,permit mv tmp.$@ $@ planet-waterway-all.geojsons: planet-waterway.osm.pbf From 0f452c146ff872a9781c22910727697bfb82ff03 Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Sat, 23 Mar 2024 20:48:50 -0400 Subject: [PATCH 2/4] Update taginfo.json for `portage` key --- docs/taginfo.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/taginfo.json b/docs/taginfo.json index 0b0126a..a9cb935 100644 --- a/docs/taginfo.json +++ b/docs/taginfo.json @@ -29,13 +29,18 @@ { "key": "lock", "value": "yes", - "description": "Used to calcualte if water flows through a canal or not", + "description": "Used to calculate if water flows through a canal or not", "object_types": ["way"] }, { "key": "canoe", "description": "Used to calculate canoe navigable waterways view", "object_types": ["way"] + }, + { + "key": "portage", + "description": "Used to calculate canoe navigable waterways view", + "object_types": ["way"] } ] } From 39cc48c0137d45a6be83dd5060d2804f6032a42f Mon Sep 17 00:00:00 2001 From: Amanda McCann Date: Mon, 25 Mar 2024 10:58:44 +0100 Subject: [PATCH 3/4] ensure portage keys are included in the final file --- dl_updates_from_osm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dl_updates_from_osm.sh b/dl_updates_from_osm.sh index 9f84032..84f34ba 100755 --- a/dl_updates_from_osm.sh +++ b/dl_updates_from_osm.sh @@ -3,7 +3,7 @@ set -o errexit -o nounset cd "$(dirname "$0")" echo "Starting dl_updates_from_osm.sh" -TAG_FILTER="w/waterway w/natural=water w/canoe" +TAG_FILTER="w/waterway w/natural=water w/canoe w/portage" if [ ! -s planet-waterway.osm.pbf ] ; then if [ ! -e planet-latest.osm.pbf ] ; then From 96d61afd85674aacf89e7cc4c7fe1fcad77d4bb1 Mon Sep 17 00:00:00 2001 From: Amanda McCann Date: Mon, 25 Mar 2024 11:17:06 +0100 Subject: [PATCH 4/4] Correct the tag filter function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `-f`/`--tag-filter` can be specified many times, and an OSM object is only included if it matches *all* defined filter's, i.e. a logical AND of all filters. The `-F`/`--tag-filter-func` takes a single ordered list of tag filters, and includes (with `→T`), or excludes (with `→F`), the OSM object based on the first filter function which matches. We want to include OSM objects with `canal=…` or `portage=…`. The original version would only include objects with both tags. This should include objects with either. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0a474b6..3f01893 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,7 @@ planet-waterway-boatable.geojsons: planet-waterway.osm.pbf mv tmp.$@ $@ planet-waterway-canoeable.geojsons: planet-waterway.osm.pbf - osm-lump-ways -i $< -o tmp.$@ --min-length-m 100 --save-as-linestrings -f canoe∈yes,portage,permissive,designated,destination,customers,permit -f portage∈yes,permissive,designated,destination,customers,permit + osm-lump-ways -i $< -o tmp.$@ --min-length-m 100 --save-as-linestrings -F "canoe∈yes,portage,permissive,designated,destination,customers,permit→T; portage∈yes,permissive,designated,destination,customers,permit→T; F" mv tmp.$@ $@ planet-waterway-all.geojsons: planet-waterway.osm.pbf