forked from osmlab/atlas-checks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new AtGradeSignPostCheck (osmlab#258)
* Add check * Handle roundabouts * spotless and checkstyle * Update roundabout req * Use edge direction * Spotless * Update java doc and spotless * Add doc * Fix typo * Fix checkstyle errors * Clean up * Address Pr comments * Rename method for clarity * Spotlessapply * Fix checkstyle and update doc * Add challenge config * Typo * Rename variable * SpotlessApply * nit * Rename variable * Fix checkstyle issues * remove enabled config key Co-authored-by: Daniel B <[email protected]>
- Loading branch information
Showing
6 changed files
with
1,007 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# AtGradeSignPostCheck | ||
|
||
#### Description | ||
|
||
This check identifies at-grade intersections that are not modeled into destination_sign relations. | ||
An at-grade intersection is an intersection with two or more edges at the same level with valid | ||
highway classifications. The highway classifications of the in and out edges of an at-grade intersection are specified in the configuration file and are as follows: | ||
1. If in edge is of type primary, the intersection is valid if there are at least two out edges, at the same z level as the in edge, that are either trunk, primary or secondary. | ||
2. If in edge is of type trunk or secondary, the intersection is valid if there are at least two out edges, at the same z level as the in edge, that are primary. | ||
|
||
#### Live Examples | ||
|
||
1. Node [id:393673917](https://www.openstreetmap.org/node/393673917) forms an at-grade intersection | ||
with ways [393673917](https://www.openstreetmap.org/way/202447272), | ||
[34370252](https://www.openstreetmap.org/way/34370252) and | ||
[41234996](https://www.openstreetmap.org/way/41234996) but is not a member of a "destination_sign" relation. | ||
2. Node [id:5351792253](https://www.openstreetmap.org/node/5351792253) forms an at-grade intersection with its exit road | ||
[554569602](https://www.openstreetmap.org/way/554569602) but is not a member of a "destination_sign" relation. | ||
|
||
#### Code Review | ||
|
||
The check ensures that the Atlas object being evaluated is a [Node](https://github.com/osmlab/atlas/blob/dev/src/main/java/org/openstreetmap/atlas/geography/atlas/items/Node.java) | ||
with a minimum node valence of 3. The node is a valid candidate for the check if it forms an intersection with edges at the same z-level with highway classification specified in the configurable. | ||
Once the node is evaluated to be a valid at-grade intersection, check if it is a member of any destination_sign relations. | ||
If the node is not part of a destination_sign relation, then flag the node along with the intersecting edges. Since a node can be part of multiple destination_sign | ||
relations, check if all the valid intersecting edges are members of destination_sign relations. If there are edges missing destination_sign | ||
relations, flag the node and the edges. If all the intersecting edges are members of relations, check if all the relations have destination tags. | ||
If the relations are missing destination_sign tag, flag it. If the node is part of a roundabout, flag all the roundabout edges when flagging the node and its intersecting edges. | ||
|
||
To learn more about the code, please look at the comments in the source code for the check. | ||
[AtGradeSignPostCheck.java](../../src/main/java/org/openstreetmap/atlas/checks/validation/intersections/AtGradeSignPostCheck.java) |
Oops, something went wrong.