#13877 closed enhancement (fixed)
Warn about waterway=canal as areas
Reported by: | naoliv | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 16.12 |
Component: | Core validator | Version: | |
Keywords: | waterway canal | Cc: |
Description
I saw some closed areas tagged as waterway = canal
https://wiki.openstreetmap.org/wiki/Tag:waterway%3Dcanal says that it's a linear feature only (ie, we should not use it on areas)
If I did the right math, we have 2243 canals as areas in OSM
Is it a worth test?
area:closed[waterway = canal] { throwWarning: tr("{0} should not be used on areas", "{1.tag}"); suggestAlternative: "width"; suggestAlternative: "waterway=riverbank"; }
Attachments (2)
Change History (29)
comment:1 by , 8 years ago
Keywords: | waterway canal added |
---|
comment:2 by , 8 years ago
comment:3 by , 8 years ago
I did with the stupid way: downloaded every waterway=canal
and validated it :-/
comment:4 by , 8 years ago
Do you still have this data availible? Can you extract all the suspicious objects (double click on the group in the validator tree to select them all) and attach the osm file here?
comment:5 by , 8 years ago
This test could be extended also for waterway=stream|ditch|river|drain.
I wonder if it could produce false positives. canal doesn't imply a flow direction, so closed ways could be possible. Also I wonder if the 4 canals at https://www.openstreetmap.org/#map=17/52.48587/13.49096 are corretly tagged as canal.
comment:6 by , 8 years ago
Milestone: | → 16.11 |
---|
follow-ups: 8 9 comment:7 by , 8 years ago
The correct number is 2305 (I forgot to also test the relations before).
Without #13884, #13885 or #13887 I can't see an easy way to filter only the affected objects.
I can copy them in another layer, but they won't keep their OSM ids (#13885)
I can select all the ways and purge the rest, but for this I also need a way to select their nodes (#13887)
Do you know any other option?
One area with real examples: https://www.openstreetmap.org/way/374711923
comment:8 by , 8 years ago
follow-up: 11 comment:9 by , 8 years ago
Replying to naoliv:
Do you know any other option?
I did't think about relations, but for ways you can do:
- select all affected ways
- add the tag xxx=yyy to the ways
- select all waynodes (I think requires utilsplugin2)
- add the tag xxx=yyy to the waynodes
- search for xxx=yyy
- invert selection by searching for -selected
- purge
comment:10 by , 8 years ago
+1
Waterways=river;canal;stream;drain;ditch only belong to unclosed ways and relations type=waterway. We uses different tags for water bodies like natural=water or waterway=riverbank.
follow-ups: 12 13 comment:11 by , 8 years ago
Replying to Klumbumbus:
Replying to naoliv:
Do you know any other option?
directly download with overpass (no need to filter/purge)
I did't think about relations, but for ways you can do:
- select all affected ways
- add the tag xxx=yyy to the ways
- select all waynodes (I think requires utilsplugin2)
- add the tag xxx=yyy to the waynodes
- search for xxx=yyy
- invert selection by searching for -selected
- purge
Way to complicated !
- create another empty layer
- select objects
- merge selected to empty layer
comment:12 by , 8 years ago
Replying to skyper:
directly download with overpass (no need to filter/purge)
How can I select only the closed canals in overpass?
I am already using it (but downloading every canal)
I will try the merge selected option later.
follow-up: 14 comment:13 by , 8 years ago
Replying to skyper:
directly download with overpass (no need to filter/purge)
How do you select only closed ways in an overpas query? (The goal was an osm file with all closed ways (+relations) with waterway=canal with their current id)
- create another empty layer
- select objects
- merge selected to empty layer
Yes, thats easier. I never used "merge selected" before :)
comment:14 by , 8 years ago
Replying to Klumbumbus:
Replying to skyper:
directly download with overpass (no need to filter/purge)
How do you select only closed ways in an overpas query? (The goal was an osm file with all closed ways (+relations) with waterway=canal with their current id)
Sorry, probably mixed up different search/filter.
Still found a solution with purge:
- download all ways with waterway=canal (probably can only download from land mass)
- search/select all unclosed ways
- purge
- download relations type=multipolygon waterway=canal
by , 8 years ago
Attachment: | canals.osm.bz2 added |
---|
comment:15 by , 8 years ago
Merge selected did a better job here.
Selecting -closed
and purging them also removed the closed ways.
edit: I should have used type:way -closed
, of course :-)
comment:16 by , 8 years ago
OK, we should exclude objects with area=no
and or attraction=*
to avoid false positives like way/175034247 or way/192657911. However it seems we can't avoid a few false positives for e.g. way/114691942 or way/225105909. (The last example is actually mapped wrong, but it could be a false positive if the multipolygon wouldn't be present.)
comment:19 by , 8 years ago
...because waterway=canal is a linear feature only and not an area feature
comment:20 by , 8 years ago
Then it won't be possible to distinguish this wrong canal way/230145073 from way/114691942, for example.
comment:21 by , 8 years ago
Yes thats what I was trying to say with "However it seems we can't avoid a few false positives for e.g. way/114691942 or way/225105909."
You can only know whether they are right or wrong from knowing the context. Both should be interpreted as linear ways. osm-carto fails there when it draws closed ways with waterway=canal as area by default. If it would draw it as linear feature we would probably have less wrongly as areas mapped waterway=canals :)
follow-ups: 24 27 comment:23 by , 8 years ago
At https://github.com/gravitystorm/openstreetmap-carto/issues/2424
I guess it's not possible to anything in JOSM then, right?
comment:24 by , 8 years ago
Replying to naoliv:
I guess it's not possible to anything in JOSM then, right?
I think we should add the test anyway. The relative and total number of false positives is very low. (This may change in the future, though.)
by , 8 years ago
Attachment: | canals2.osm.bz2 added |
---|
file from naoliv but with downloaded members of the multipolygons
comment:27 by , 8 years ago
Replying to naoliv:
At https://github.com/gravitystorm/openstreetmap-carto/issues/2424
This issue was just fixed.
Replying to naoliv:
How did you calculate it?