osmlab / atlas-checks

OSM data integrity checks with Atlas
BSD 3-Clause "New" or "Revised" License
57 stars 83 forks source link

[New Check] Separate Sidewalk Tag Check #653

Closed vladlemberg closed 2 years ago

vladlemberg commented 2 years ago

Description 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. It is important to note here that separately mapped highways is still a proposal (https://wiki.openstreetmap.org/wiki/Proposed_features/sidewalk_schema). The use of separately mapped sidewalks is not a requirement and this check will not ask mappers to add separate sidewalk ways unless the tags specify “separate” sidewalks. Existence of sidewalk=both|left|right highway tags AND separate sidewalks is discouraged, but not illegal, but this check will ask mappers to alter sidewalk tags on the way to be sidewalk=separate if there are separate sidewalks in the area.

Requirements An Atlas Object to be flag must meet the following criteria to be considered:

image
  1. A ‘1’ indicates an invalid combination that should be flagged as an issue. Text used in these situations should be as shown below.
    1. “The way has sidewalk tags that conflict with separately mapped sidewalks near this way. The way indicates that sidewalks are , but separately mapped sidewalks were detected on . Please correct the separately mapped sidewalks and we recommend changing the sidewalk tag on this way to sidewalk=separate."
  2. A ‘2’ indicates that the way tags specifically indicate separate sidewalks should be mapped, and the separate ways that are detected do not match with the way’s sidewalk tags. Text used in these situations is similar to number 1 but a bit different to call out the difference.
    1. “The way has sidewalk tags that conflict with separately mapped sidewalks near this way. The way indicates that sidewalks are , but separately mapped sidewalks were detected on . Please correct the separately mapped sidewalks or update the ways sidewalk tags to be consistent.”
  3. A ‘3’ indicates that the way tags specifically indicate separate sidewalks should be mapped, But no separate sidewalks are detected near this way.
    1. “The way has separate sidewalk tags that indicate that separate sidewalks are mapped, but no separate sidewalks were detected near this way. Please map the separate sidewalks as necessary and make sure that the way’s sidewalk tags are consistent with the separately mapped sidewalks.”
  4. A ‘4’ indicates that the way’s sidewalk tags are consistent with the detected sidewalks near this way, but the way’s sidewalk tag should be updated to be sidewalk=separate to indicate that the sidewalks have been mapped separately. A further test on this set is advisable to make sure that any “additional” sidewalk tags applied to the way’s sidewalk tags have been moved to the separately mapped sidewalks. See https://wiki.openstreetmap.org/wiki/Key:sidewalk#Additional_tags for examples. Keep in mind that, because we are changing the sidewalk tag to “separate“, the additional tags are expected to be moved to the separately mapped sidewalks. Note that this is not a hard requirement, but in moving toward separate sidewalks it seems advisable.
  5. A ‘5’ indicates that the way’s separate sidewalk tags are consistent with the detected sidewalks near this way. A further test on this set is advisable to make sure that NO “additional” sidewalk tags exist on the way’s sidewalk tags. All additional sidewalk tags on the way should be moved to the separate way as indicated in the wiki: https://wiki.openstreetmap.org/wiki/Key:sidewalk#Additional_tags. Keep in mind that in this case, since the mapper used the separate sidewalk tags, the additional tags are expected to only exist on the separate sidewalk ways.

Required variables for the check will need to be introduced to allow for some alteration of how the algorithm to detect sidewalks work.

Use Cases

  1. As an example of a sidewalk tag that doesn’t match separately mapped sidewalks here is Elm Street that clearly has sidewalks on both sides of the street. The way has a sidewalk=both tag. One sidewalk exists on the right of this way, but no sidewalk exists on the left side of this way. This should be flagged since a separate sidewalk was mapped, but the orientation of the separately mapped sidewalks doesn't match the highway's sidewalk tag.

    image
  2. <can’t find one there are no uses of sidewalk:right=separate or sidewalk:left=separate>

  3. In another example we have Colonial Drive (https://www.openstreetmap.org/way/17001945) that has a tag indicating sidewalk=separate but there is no separate sidewalk mapped for this road.

    image
  4. In this example we have a way that has a sidewalk:both:surface=asphalt tag applied to the highway. The separately mapped sidewalk as no tag indicating surface type. To fix this situation the mapper should

    1. Change sidewalk=both on the way to sidewalk=separate
    2. sidewalk:both:surface=asphalt should be removed from the way
    3. surface=asphalt should be added to both sidewalks that surround this way. image image
vladlemberg commented 2 years ago

@Bentleysb,

vladlemberg commented 2 years ago

This check is already been merged to dev.