From c7bd512dcd7e2b859e23b8a20921dea2266e227c Mon Sep 17 00:00:00 2001 From: Mara Alexandria Rae Date: Wed, 23 Oct 2019 14:56:26 -0700 Subject: [PATCH] Checks documentation (#204) * Compass checks catalog update Includes 22 additional open source checks grouped by check type based on Compass checks catalog * Update README.md * Table Organized available checks into a table. * PoolSizeCheck Updated PoolSizeCheck description. * Strikethrough Added strikethrough formatting for deprecated checks. * Left align Changed Check Name and Check Description columns to left aligned text. * Deprecated descriptions and alignment Updated the Check Descriptions column for deprecated checks, and changed the Check Type column to left alignment. * Update README.md * Created Moved table from README.md to a separate document. * Removed Moved table for Currently Available Checks to a separate document. * Title and description Added title and description * Description Added description for Currently Available Checks * GeneralizedCoastlineCheck Added GeneralizedCoastlineCheck * Renamed Changed document name * Replaced link Replaced Available checks link under Currently Available Checks * Added checks Added 5 checks that still require links to documentation (docs have not yet been created) * Moved Moved AreasWithHighwayTagsCheck * PedestrianAreaOverlappingEdgeCheck Moved PedestrianAreaOverlappingEdgeCheck * Header Updated header * Links Fixed broken links to check documentation * AreasWithHighwayTagCheck doc created * EdgeCrossingEdgeCheck doc created * IntersectingBuildingsCheck doc created * SignPostCheck doc created * UnusualLayerTagsCheck doc created * Added missing docs * Updated available_checks.md * Revised docs for AreasWithHighwayTagCheck, EdgeCrossingEdgeCheck, IntersectingBuildingsCheck, SignPostCheck, and UnusualLayerTagsCheck. * Revised doc for IntersectingBuildingCheck * Revised docs for five checks * Revised doc for IntersectingBuildingsCheck. * Revised doc for IntersectingBuildingsCheck. * Updated description for GeneralizedCoastlineCheck. --- docs/available_checks.md | 12 ++++---- docs/checks/areasWithHighwayTagCheck.md | 24 +++++++++++++++ docs/checks/edgeCrossingEdgeCheck.md | 19 ++++++++++++ docs/checks/intersectingBuildingsCheck.md | 35 ++++++++++++++++++++++ docs/checks/signPostCheck.md | 26 ++++++++++++++++ docs/checks/unusualLayerTagsCheck.md | 36 +++++++++++++++++++++++ 6 files changed, 146 insertions(+), 6 deletions(-) create mode 100644 docs/checks/areasWithHighwayTagCheck.md create mode 100644 docs/checks/edgeCrossingEdgeCheck.md create mode 100644 docs/checks/intersectingBuildingsCheck.md create mode 100644 docs/checks/signPostCheck.md create mode 100644 docs/checks/unusualLayerTagsCheck.md diff --git a/docs/available_checks.md b/docs/available_checks.md index 696688cb0..62c287393 100644 --- a/docs/available_checks.md +++ b/docs/available_checks.md @@ -4,7 +4,7 @@ This document is a list of tables with a description and link to documentation f ## Areas | Check Name | Check Description | | :--------- | :---------------- | -| AreasWithHighwayTagCheck | The purpose of this check is to identify Areas attributed with highway tags. | +| [AreasWithHighwayTagCheck](checks/areasWithHighwayTagCheck.md) | The purpose of this check is to identify Areas attributed with highway tags. | | [PoolSizeCheck](tutorials/tutorial1-PoolSizeCheck.md) | The purpose of this check is to identify pools that are larger than 5,000,000 square meters or smaller than 5 square meters. This check was created to be used as a tutorial for developing new checks. | | [OverlappingAOIPolygonCheck](checks/overlappingAOIPolygonCheck.md) | The purpose of this check is to identify areas of interest (AOIs) that are overlapping one another. | | [PedestrianAreaOverlappingEdgeCheck](checks/pedestrianAreaOverlappingEdgeCheck.md) | The purpose of this check is to identify pedestrian areas overlapping with roads that are not snapped to car navigable edges. | @@ -14,14 +14,14 @@ This document is a list of tables with a description and link to documentation f ## Highways | Check Name | Check Description | | :--------- | :---------------- | -| EdgeCrossingEdgeCheck | The purpose of this check is to identify Edges intersecting another Edge(s) that do not share the same Node (meaning they are not well-connected) nor have proper layer tagging on one of these Edge(s) (meaning there should be a layer tag for one of the Edges). | +| [EdgeCrossingEdgeCheck](checks/edgeCrossingCheck.md) | The purpose of this check is to identify Edges intersecting another Edge(s) that do not share the same Node (meaning they are not well-connected) nor have proper layer tagging on one of these Edge(s) (meaning there should be a layer tag for one of the Edges). | | [FloatingEdgeCheck](checks/floatingEdgeCheck.md) | The purpose of this check is to identify Edges that are not accessible or navigable from the rest of the Edge network due to lack of connectivity or access restrictions. | | [MalformedRoundaboutCheck](checks/malformedRoundaboutCheck.md) | The purpose of this check is to identify roundabouts mapped in the opposite direction of traffic. The check takes into consideration countries with both left-side and right-side traffic. There are three types of map errors that will be flagged by this check: 1. Wrong-way-roundabouts, 2. Multi-directional roundabouts, and 3. Roundabouts with poor geometry. | | [~~RoundaboutClosedLoopCheck~~ (Deprecated)](checks/roundaboutClosedLoopCheck.md) | The purpose of this check is to identify Roundabout Edges that are bi-directional or have an end Node with less than 2 connections. **This check has been deprecated and is no longer active.** | | [RoundaboutConnectorCheck](checks/roundaboutConnectorCheck.md) | The purpose of this check is to identify roads that connect to a roundabout at too sharp an angle | | [RoundaboutValenceCheck](checks/roundaboutValenceCheck.md) | The purpose of this check is to identify OpenStreetMap (OSM) tagged roundabouts that have an unusual number of edges connected to them. | | [SharpAngleCheck](checks/sharpAngleCheck.md) | The purpose of this check is to identify roads with angles that are too sharp. Sharp angles may indicate inaccurate digitization once a certain threshold is exceeded. | -| SignPostCheck | The purpose of this check is to identify On-/Off-Ramps in motorways and trunk highways that are not relaying information from their respective sign posts. | +| [SignPostCheck](checks/signPostCheck.md) | The purpose of this check is to identify On-/Off-Ramps in motorways and trunk highways that are not relaying information from their respective sign posts. | | [SingleSegmentMotorwayCheck](checks/singleSegmentMotorwayCheck.md) | The purpose of this check is to identify ways tagged with highway=motorway that are not connected to any ways tagged the same. | | [SinkIslandCheck](tutorials/tutorial3-SinkIslandCheck.md) | The purpose of this check is to identify whether a network of car-navigable Edges can be exited. | | [SnakeRoadCheck](checks/snakeRoadCheck.md) | The purpose of the SnakeRoad check is to identify roads that should be split into two or more roads. | @@ -57,14 +57,14 @@ This document is a list of tables with a description and link to documentation f | [MixedCaseNameCheck](checks/mixedCaseNameCheck.md) | The purpose of this check is to identify names that contain invalid mixed cases so that they can be edited to be the standard format. | | [RoadNameSpellingConsistencyCheck](checks/RoadNameSpellingConsistencyCheck.md) | The purpose of this check is to identify road segments that have a name Tag with a different spelling from that of other segments of the same road. This check is primarily meant to catch small errors in spelling, such as a missing letter, letter accent mixups, or capitalization errors. | | [StreetNameIntegersOnlyCheck](checks/streetNameIntegersOnlyCheck.md) | The purpose of this check is to identify streets whose names contain integers only. | -| UnusualLayerTagsCheck | The purpose of this check is to identify layer tag values when accompanied by invalid tunnel and bridge tags. | +| [UnusualLayerTagsCheck](checks/unusualLayerTagsCheck.md) | The purpose of this check is to identify layer tag values when accompanied by invalid tunnel and bridge tags. | ## Ways | Check Name | Check Description | | :--------- | :---------------- | | [BuildingRoadIntersectionCheck](checks/buildingRoadIntersectionCheck.md) | The purpose of this check is to identify buildings that intersect/overlap roads. | | [~~DuplicateWaysCheck~~ (Deprecated)](checks/duplicateWaysCheck.md) | The purpose of this check is to identify Ways that have either had their entire length or a segment of their length duplicated or drawn multiple times. **This check has been deprecated and is no longer active.** | -| [GeneralizedCoastlineCheck](checks/generalizedCoastlineCheck.md) | The purpose of this check is to identify coastlines whose nodes are too far apart. | -| IntersectingBuildingsCheck | The purpose of this check is to identify buildings that intersect other buildings. | +| [GeneralizedCoastlineCheck](checks/generalizedCoastlineCheck.md) | The purpose of this check is to identify coastlines whose nodes are too far apart, have angles that are too sharp, and/or have _source=PGS_ Tag values. | +| [IntersectingBuildingsCheck](checks/intersectingBuildingsCheck.md) | The purpose of this check is to identify buildings that intersect other buildings. | | [SelfIntersectingPolylineCheck](checks/selfIntersectingPolylineCheck.md) | The purpose of this check is to identify all edges/lines/areas in Atlas that have self-intersecting polylines, or geometries that intersects itself in some form. | | [WaterbodyAndIslandSizeCheck](checks/waterbodyAndIslandSizeCheck.md) | The purpose of this check is to identify waterbodies and islands which are either too small or too large in size. | diff --git a/docs/checks/areasWithHighwayTagCheck.md b/docs/checks/areasWithHighwayTagCheck.md new file mode 100644 index 000000000..bd168cf5e --- /dev/null +++ b/docs/checks/areasWithHighwayTagCheck.md @@ -0,0 +1,24 @@ +# AreasWithHighwayTagCheck + +#### Description + +The purpose of this check is to identify Areas attributed with invalid _highway_ Tags. Areas are defined as the Atlas Area Object, not the explicit OSM area definition. An Area will be flagged if it has a _highway_ Tag attached to it, unless the _highway_ Tag is part of the `VALID_HIGHWAY_TAGS` set. Any Area that is flagged an invalid _highway_ Tag will have the invalid _highway_ Tag removed. + +The set of `VALID_HIGHWAY_TAGS` is defined in the source code as: +``` +private static final EnumSet VALID_HIGHWAY_TAGS = EnumSet.of(HighwayTag.SERVICES, + HighwayTag.SERVICE, HighwayTag.REST_AREA, HighwayTag.PEDESTRIAN, HighwayTag.PLATFORM); +``` +Therefore, Areas with _highway=SERVICES_, _highway=SERVICE_, _highway=REST\_AREA_, _highway=PEDESTRIAN_ and _highway=PLATFORM_ will not be flagged by this check. + +#### Live Examples + +1. Line [id:227275283](https://www.openstreetmap.org/way/227275283) is an area with an invalid highway Tag. +2. Line [id:231865304](https://www.openstreetmap.org/way/231865304) is an area with an invalid highway Tag. + +#### Code Review + +The check ensures that the Atlas object being evaluated is an Area. The tags associated with that Area are then verified to not be _highway_ Tags, unless they are part of the `VALID_HIGHWAY_TAGS` set. If the Area contains a _highway_ Tag that is not part of the `VALID_HIGHWAY_TAGS` set, then the _highway_ Tag will be removed. + +To learn more about the code, please look at the comments in the source code for the check. +[AreasWithHighwayTagCheck.java](../../src/main/java/org/openstreetmap/atlas/checks/validation/areas/AreasWithHighwayTagCheck.java) \ No newline at end of file diff --git a/docs/checks/edgeCrossingEdgeCheck.md b/docs/checks/edgeCrossingEdgeCheck.md new file mode 100644 index 000000000..0a08021bf --- /dev/null +++ b/docs/checks/edgeCrossingEdgeCheck.md @@ -0,0 +1,19 @@ +# EdgeCrossingEdgeCheck + +#### Description + +The purpose of this check is to identify Edges intersecting another Edge(s) that do not share the same Node (meaning they are not well-connected) nor have proper layer tagging on one of these Edge(s) (meaning there should be a _layer_ Tag for one of the Edges). + +#### Live Examples + +1. Line [id:245574716](https://www.openstreetmap.org/way/245574716) and [id:245574709](https://www.openstreetmap.org/way/245574709) do not share a node of intersection. +2. Line [id:400798431](https://www.openstreetmap.org/way/400798431) and [id:386147030](https://www.openstreetmap.org/way/386147030) cross invalidly. +3. Line [id:313458620](https://www.openstreetmap.org/way/313458620) and [id:554507231](https://www.openstreetmap.org/way/554507231) are overlapping duplicates. +4. Line [id:486493202](https://www.openstreetmap.org/way/486493202) and [id:172811290](https://www.openstreetmap.org/way/172811290) are duplicates that intersect at [id:172811276](https://www.openstreetmap.org/way/172811276). + +#### Code Review + +The check ensures that the Atlas object being evaluated is a car-navigable Edge. The check flags Edges that cross each other if they do not share the same node of intersection, or if none of the Edges have a _layer_ Tag. In addition, this check flags all Edges that cross the "candidate edge" Edge that is currently inspected by the check). The check inspects every Edge, creating duplicated flags when there are multiple Edges invalidly crossing each other. + +To learn more about the code, please look at the comments in the source code for the check. +[EdgeCrossingEdgeCheck.java](../../src/main/java/org/openstreetmap/atlas/checks/validation/intersections/EdgeCrossingEdgeCheck.java) \ No newline at end of file diff --git a/docs/checks/intersectingBuildingsCheck.md b/docs/checks/intersectingBuildingsCheck.md new file mode 100644 index 000000000..f416193f3 --- /dev/null +++ b/docs/checks/intersectingBuildingsCheck.md @@ -0,0 +1,35 @@ +# IntersectingBuildingsCheck + +#### Description + +The purpose of this check is to identify buildings that intersect other buildings. + +#### Live Examples + +1. Line [id:172116389](https://www.openstreetmap.org/way/172116389) and [id:172116424](https://www.openstreetmap.org/way/172116424) have _building=YES_ Tags and do not fully contain one another, so they are flagged as 'intersect'. +2. Line [id:525062338](https://www.openstreetmap.org/way/525062338) fully contains [id:525062342](https://www.openstreetmap.org/way/525062342) and both have _building=YES_ Tags. +3. Line [id:334111739](https://www.openstreetmap.org/way/334111739) with _building=COMMERCIAL_ Tag fully contains [id:463063324](https://www.openstreetmap.org/way/463063324) with _building=RESIDENTIAL_ Tag. + +#### Code Review + +Each pair of intersecting buildings will only be flagged once (i.e. A intersecting B = B intersecting A). + + An Atlas object must meet the following criteria to be considered a building: + +- It must have at least 3 points. +- It must have a _building_ Tag and has a value that is defined in [BuildingTag.java](https://github.com/osmlab/atlas/blob/dev/src/main/java/org/openstreetmap/atlas/tags/BuildingTag.java). + +Intersecting buildings are either flagged as 'intersect' or 'overlap': + +- `intersectLowerLimit` and `overlapLowerLimit` are two configurable parameters that determine the flag type. +- The default values are: `intersectLowerLimit = 0.01` (1%), and `overlapLowerLimit = 0.90` (90%). +- Flag types: + 1. Intersect flag: + - `intersectLowerLimit` <= the proportion of the intersection area compared to the smaller building area < `overlapLowerLimit` + - Output instruction = 'building A intersects with building B' + 2. Overlap flag: + - The proportion of the intersection area compared to the smaller building area >= `overlapLowerLimit` + - Output instruction = 'building A is overlapped by another building B' + +To learn more about the code, please look at the comments in the source code for the check. +[IntersectingBuildingsCheck.java](../../src/main/java/org/openstreetmap/atlas/checks/validation/intersections/IntersectingBuildingsCheck.java) \ No newline at end of file diff --git a/docs/checks/signPostCheck.md b/docs/checks/signPostCheck.md new file mode 100644 index 000000000..a74937d34 --- /dev/null +++ b/docs/checks/signPostCheck.md @@ -0,0 +1,26 @@ +# SignPostCheck + +#### Description + +The purpose of this check is to identify On-/Off-Ramps in motorways and trunk highways that are not relaying information from their respective sign posts. + +#### Live Examples + +1. Line [id:124741413](https://www.openstreetmap.org/way/124741413) represents the Edge on the Off-Ramp that should have a _destination_ Tag, which is currently missing. +2. Line [id:16613326](https://www.openstreetmap.org/way/16613326) shows the Edge on the Off-Ramp should have a _destination_ Tag, which is currently missing. Also, the Node that branched off the regular motorway and entered the Off-Ramp should have a _highway=MOTORWAY\_JUNCTION_ Tag, which is currently missing. + +#### Code Review + +Sign post information should be tagged at the 1st Edge of the On-/Off-Ramps for the highway. +This check flags: + +- The 1st Edge of an On-/Off-Ramp that does not have a _destination_ Tag +- The starting Node of the 1st Edge of an On-/Off-Ramp which does not have a _highway=MOTORWAY\_JUNCTION_ Tag + +In OSM, there is no specific tag to represent On-/Off-Ramps. There are three steps to search the 1st Edge of the On-/Off-Ramps: +1. Define a “possible ramp edge” +2. Search On-/Off-Ramps +3. Find the 1st Edge of the On Ramp + +To learn more about the code, please look at the comments in the source code for the check. +[SignPostCheck.java](../../src/main/java/org/openstreetmap/atlas/checks/validation/linear/edges/SignPostCheck.java) \ No newline at end of file diff --git a/docs/checks/unusualLayerTagsCheck.md b/docs/checks/unusualLayerTagsCheck.md new file mode 100644 index 000000000..667fbad5d --- /dev/null +++ b/docs/checks/unusualLayerTagsCheck.md @@ -0,0 +1,36 @@ +# UnusualLayerTagsCheck + +#### Description + +The purpose of this check is to identify _layer_ Tag values when accompanied by invalid _tunnel_ and _bridge_ Tags. + +#### Live Examples + +1. Line [id:521569767](https://www.openstreetmap.org/way/521569767) has _Layer_ Tag > 0, and is within _tunnel=BUILDING\_PASSAGE_. +2. Line [id:479328850](https://www.openstreetmap.org/way/479328850) has _Layer_ Tag < 0, and crosses _bridge=YES_. + +#### Code Review + +This check is intended to validate _layer_ Tag values when accompanied by _tunnel_ and _bridge_ Tags which meet any of the following four requirements. + + 1. The _layer_ Tag value should be an integer, ranging from -5 to 5, and excluding 0 (per [LayerTag.java](https://github.com/osmlab/atlas/blob/dev/src/main/java/org/openstreetmap/atlas/tags/LayerTag.java)) + 2. Ways passing above other Ways with valid _layer_ Tags (see item 1), that are accompanied by a _bridge_ Tag containing any of the following values (per [BridgeTag.java](https://github.com/osmlab/atlas/blob/dev/src/main/java/org/openstreetmap/atlas/tags/BridgeTag.java)): + * _YES_, + * _VIADUCT_, + * _AQUEDUCT_, + * _BOARDWALK_, + * _MOVABLE_, + * _SUSPENSION_, + * _CULVERT_, + * _ABANDONED_, + * _LOW\_WATER\_CROSSING_, + * _SIMPLE\_BRUNNEL_, + * or _COVERED_ + 3. Ways passing above other Ways with valid _layer_ Tags, that are accompanied by a _tunnel_ Tag containing any of the following values (per [TunnelTag.java](https://github.com/osmlab/atlas/blob/dev/src/main/java/org/openstreetmap/atlas/tags/TunnelTag.java)): + * _YES_, + * _CULVERT_, + * or _BUILDING\_PASSAGE_ + 4. Ways with a _junction=ROUNDABOUT_ Tag must not contain a _layer_ Tag (per [JunctionTag.java](https://github.com/osmlab/atlas/blob/dev/src/main/java/org/openstreetmap/atlas/tags/JunctionTag.java)) + +To learn more about the code, please look at the comments in the source code for the check. +[UnusualLayerTagsCheck.java](../../src/main/java/org/openstreetmap/atlas/checks/validation/tag/UnusualLayerTagsCheck.java) \ No newline at end of file