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.
* Partially working water area test Signed-off-by: Taylor Smock <[email protected]> * More false positives, but catches issues Signed-off-by: Taylor Smock <[email protected]> * Improve check (ignore dams, better intersection handling) Signed-off-by: Taylor Smock <[email protected]> * WaterAreaCheck: Continue through area checks instead of stopping at the first problem Signed-off-by: Taylor Smock <[email protected]> * WaterAreaCheck: Remove unnecessary line Signed-off-by: Taylor Smock <[email protected]> * WaterAreaCheck: Add default config values Signed-off-by: Taylor Smock <[email protected]> * WaterAreaCheck: Expand variable names * Lambda functions have expanded variables * Other variables should be expanded Signed-off-by: Taylor Smock <[email protected]> * WaterAreaCheck: Move discrete checks to separate functions Signed-off-by: Taylor Smock <[email protected]> * WaterAreaCheck: Configuration: FIXUP: Failing tests * ConfigurationDeserializer#locateMap had an issue with a configuration variable Signed-off-by: Taylor Smock <[email protected]> * WaterAreaCheck: Add docs Signed-off-by: Taylor Smock <[email protected]> * WaterAreaCheckTest: FIXUP: Remove extraneous TODO comment Signed-off-by: Taylor Smock <[email protected]>
- Loading branch information
Showing
6 changed files
with
757 additions
and
2 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,38 @@ | ||
# Water Area Check | ||
|
||
#### Description | ||
This check identifies waterbodies that cross each other or are missing a waterway (if the water area requires a water way). | ||
|
||
#### Live Example | ||
1) This [riverbank](https://www.openstreetmap.org/way/661564606) is missing a river waterway (on 2020-09-09). | ||
|
||
2) This [pond](https://www.openstreetmap.org/way/448755487) is overlapping another [pond](https://www.openstreetmap.org/way/455609665). | ||
|
||
#### Code Review | ||
In [Atlas](https://github.com/osmlab/atlas), OSM elements are represented as Edges, Points, Lines, | ||
Nodes, Areas & Relations; in our case, we’re are looking at [Areas](https://github.com/osmlab/atlas/blob/dev/src/main/java/org/openstreetmap/atlas/geography/atlas/items/Area.java). | ||
|
||
Our first goal is to validate the incoming Atlas object. Valid features for this check will satisfy | ||
the following conditions: | ||
* Must be an Area with one of the following tags: | ||
* `natural=WATER` AND `water=*` | ||
* `wterway=RIVERBANK` | ||
|
||
After the preliminary filtering, each object goes through a series of checks, the first of which checks to see if there should be a waterway inside the object, the second checks to ensure that water has a place to go (waterway exists the water body), and the third checks for overlapping waterways. | ||
|
||
|
||
### Sample configuration (defaults) | ||
``` | ||
{ | ||
"WaterAreaCheck": { | ||
"intersect.minimum.limit": 0.01, | ||
"water.tags.crossing.ignore": ["waterway->dam"], | ||
"water.tags.filters": ["waterway->*"], | ||
"water.tags.filtersrequireswaterway": ["natural->water&water->river,stream_pool,canal,lock|waterway->riverbank"], | ||
"waterway.tags.filters": ["natural->water&water->*|waterway->riverbank"] | ||
} | ||
} | ||
``` | ||
|
||
To learn more about the code, please look at the comments in the source code for the check. | ||
[WaterAreaCheck.java](../../src/main/java/org/openstreetmap/atlas/checks/validation/areas/WaterbodyAreaCheck.java) |
Oops, something went wrong.