|
| 1 | +# Separate Sidewalk Tag Check |
| 2 | + |
| 3 | +#### Description |
| 4 | +A check to validate that when sidewalk=* tags are used on a highway that any separately mapped sidewalk(s) are consistent with the highway’s sidewalk tags. |
| 5 | + |
| 6 | +#### Live Example |
| 7 | +Please note that examples below might be fixed olready. |
| 8 | +1) [id:42023472](https://www.openstreetmap.org/way/42023472) |
| 9 | +2) [id:415202408](https://www.openstreetmap.org/way/415202408) |
| 10 | +3) [id:370064399](https://www.openstreetmap.org/way/370064399) |
| 11 | +4) [id:684661218](https://www.openstreetmap.org/way/684661218) |
| 12 | + |
| 13 | + |
| 14 | +#### Code Review |
| 15 | +In [Atlas](https://github.com/osmlab/atlas), OSM elements are represented as Edges, Points, Lines, |
| 16 | +Nodes & Relations; in our case, we’re working with [Edges](https://github.com/osmlab/atlas/blob/dev/src/main/java/org/openstreetmap/atlas/geography/atlas/items/Edge.java) that have Sidewalk tags. |
| 17 | +In OpenStreetMap, [Sidewalks](https://wiki.openstreetmap.org/wiki/Key:sidewalk) ma |
| 18 | + |
| 19 | +Our first goal is to validate the incoming Atlas Object. |
| 20 | +* Must be a valid main Edge |
| 21 | +* Must have not already been flagged |
| 22 | +* Must be car navigable |
| 23 | +* Must have [Sidewalks](https://wiki.openstreetmap.org/wiki/Key:sidewalk) tags |
| 24 | +* Must not be a closed way [OSM-wiki:Closed Way](https://wiki.openstreetmap.org/wiki/Item:Q4669) |
| 25 | +* Must not be a [dual carriageway](https://wiki.openstreetmap.org/wiki/Tag:dual_carriageway%3Dyes). |
| 26 | +* Must have a certain length (default 20 meters) |
| 27 | + |
| 28 | +Our second goal is to search for [separately mapped Sidewalks](https://wiki.openstreetmap.org/wiki/Tag:highway%3Dfootway) around the Edge midpoint within certain search distance (default 15 meters). We use a [boxAround](https://github.com/osmlab/atlas/blob/dev/src/main/java/org/openstreetmap/atlas/geography/Location.java#L211) |
| 29 | +to gather all sidewalks. |
| 30 | + |
| 31 | +After we found separately mapped sidewalks, we ensure that |
| 32 | +* Sidewalk is on the same layer with the highway |
| 33 | +* Sidewalk is not crossing the highway |
| 34 | +* Sidewalk is not sharing a location with the highway |
| 35 | +* Sidewalk is more or less parallel with the highway |
| 36 | + |
| 37 | +Our third goal is to identify the side (left|right) for every separately mapped sidewalk. |
| 38 | + |
| 39 | +After we identified the side, we ensure that tagging of highway sidewalk is consistent with separately mapped sidewalk. |
| 40 | + |
| 41 | + |
| 42 | +To learn more about the code, please look at the comments in the source code for the check. |
| 43 | +[SeparateSidewalkTagCheck.java](../../src/main/java/org/openstreetmap/atlas/checks/validation/linear/edges/SeparateSidewalkTagCheck.java) |
0 commit comments