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.
Suddenhighwaytypechange (osmlab#381)
* new suddenhighwaytypechangecheck with simplified logic and more inline with osmose issue 1090. * Updated check and required documents * Fixed test issues * Replacing strings with HighwayType. * removing config default value * updating documentation regarding the suddenhighwaytypechangecheck * spotless apply * fixing sonar cloud errors and spotless * Update SuddenHighwayTypeChangeCheck.java * Update SuddenHighwayTypeChangeCheck.java * Update SuddenHighwayTypeChangeCheck.java * Update SuddenHighwayTypeChangeCheck.java * Update SuddenHighwayTypeChangeCheck.java * consolidated conditionals to simplify final method * Update SuddenHighwayTypeChangeCheck.java * Update SuddenHighwayTypeChangeCheck.java * Update SuddenHighwayTypeChangeCheck.java * Update SuddenHighwayTypeChangeCheck.java * Update SuddenHighwayTypeChangeCheck.java * removing marking connected edges as flagged to maximize detections. * Update SuddenHighwayTypeChangeCheck.java * fixing change requests from pull request. * updated test checks for cases and addressed comments * fixed config * fixing code smells * hopefully last spotless apply * fixed config * siplified the main functions with return true or false
- Loading branch information
Showing
6 changed files
with
576 additions
and
5 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,40 @@ | ||
# SuddenHighwayTypeChangeCheck | ||
|
||
#### Description | ||
|
||
The purpose of this check is to identify ways that have sudden highway tag jumps based on 3 different classes. | ||
|
||
#### Live Examples | ||
Sudden Highway Type Changes | ||
1. The way [id:698449634](https://www.openstreetmap.org/way/698449634) jumps from primary road to tertiary road. Flagged edge even needs to be a link. | ||
|
||
#### Code Review | ||
|
||
This check evaluates [Edges](https://github.com/osmlab/atlas/blob/dev/src/main/java/org/openstreetmap/atlas/geography/atlas/items/Edge.java) | ||
, it attempts to find large jumps in highway classifications. | ||
|
||
##### Validating the Object | ||
We first validate that the incoming object is: | ||
* An Edge | ||
* A Main edge | ||
* The Edge is Car Navigable | ||
* The Edge is of a specified minimum highway type (tertiary) | ||
* The Edge is not a roundabout or circular | ||
|
||
##### Flagging the Edge | ||
Gather the ways' in and out edges. Iterate over these edges and determining if they fit within the 3 classifications of this check. | ||
|
||
##### Three classifications of Sudden Highway Tag Changes | ||
###### Class 1 | ||
* Way with following classification: **Motorway, Trunk, or Primary** | ||
* Above way terminates and connects to following classification: **Tertiary, Unclassified, Residential, or Service** | ||
###### Class 2 | ||
* Way with following classification: **Motorway_Link, Trunk_Link, Primary_Link, Secondary_Link, or Secondary** | ||
* Above way terminates and connects to following classification: **Unclassified, Residential, or Service** | ||
###### Class 3 | ||
* Way with following classification: **Tertiary or Tertiary_Link** | ||
* Above way terminates and connects to following classification: **Living_Street, Service, or Track** | ||
|
||
|
||
To learn more about the code, please look at the comments in the source code for the check. | ||
[SuddenHighwayTypeChangeCheck.java](../../src/main/java/org/openstreetmap/atlas/checks/validation/linear/edges/SuddenHighwayTypeChangeCheck.java) |
Oops, something went wrong.