Skip to content

Commit

Permalink
Multiple Names on Street Check Osmose 5030 (osmlab#596)
Browse files Browse the repository at this point in the history
* Bug 558 InvalidAccessTagCheck should ignore borders

* Fix osmlab#558 InvalidAccessTagCheck needs to ignore ways that cross borders

* Fix osmlab#558 InvalidAccessTagCheck needs to ignore ways that cross borders

* Fix osmlab#558 InvalidAccessTagCheck needs to ignore ways that cross borders

* Fix osmlab#558 InvalidAccessTagCheck needs to ignore ways that cross borders

* Fix osmlab#558 InvalidAccessTagCheck needs to ignore ways that cross borders

* Fix osmlab#558 InvalidAccessTagCheck needs to ignore ways that cross borders

* Fix osmlab#558 InvalidAccessTagCheck needs to ignore ways that cross borders

* MultipleNamesOnStreetCheck Osmose 5030

* MultipleNamesOnStreetCheck Osmose 5030

* MultipleNamesOnStreetCheck Osmose 5030

* MultipleNamesOnStreetCheck Osmose 5030

* MultipleNamesOnStreetCheck Osmose 5030

* MultipleNamesOnStreetCheck Osmose 5030

* MultipleNamesOnStreetCheck Osmose 5030

* MultipleNamesOnStreetCheck Osmose 5030

* MultipleNamesOnStreetCheck Osmose 5030

* MultipleNamesOnStreetCheck Osmose 5030

* MultipleNamesOnStreetCheck Osmose 5030

* MultipleNamesOnStreetCheck Osmose 5030

Co-authored-by: mselaineshum <[email protected]>
Co-authored-by: Elaine Shum <[email protected]>
  • Loading branch information
3 people authored Aug 10, 2021
1 parent eb289b2 commit c4e17c9
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 2 deletions.
6 changes: 6 additions & 0 deletions docs/checks/invalidTagsCheck.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ in json format: `{
The `instruction` attribute is optional.
To be mentioned here that the resource file for the `RegexTaggableFilter` must contain the word `regex` in it's name.

#### Live Example
This way [id:609158689] https://www.openstreetmap.org/way/609158689 contains '/'
This way [id:895641297] https://www.openstreetmap.org/way/895641297 contains '?'
This way [id:26830712] https://www.openstreetmap.org/way/26830712 contains ';'
This way [id:919752321] https://www.openstreetmap.org/way/919752321 contains '+'

#### 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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"filters": [
{
"instruction": "The edge tag: {0} contains MULTIPLE VALUES separated by FORWARD SLASH '/'.",
"regex": ["[A-Z0-9]{5}\\s?/"],
"tagNames": ["name"],
"exceptions": [
{
"tagName": "name",
"values": [
"Vehicular/ Peatonal"
]
}
]
},
{
"instruction": "The edge tag: {0} contains MULTIPLE VALUES separated by BACKSLASH '\\'.",
"regex": ["\\\\"],
"tagNames": ["name"],
"exceptions": []
},
{
"instruction": "The edge tag: {0} contains MULTIPLE VALUES separated by PLUS sign '+'.",
"regex": ["\\+"],
"tagNames": ["name"],
"exceptions": []
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,14 @@
"regex": [";"],
"tagNames": [
"addr:street",
"aerialway",
"aeroway",
"highway",
"lanes",
"maxspeed",
"name",
"railway",
"route",
"surface",
"telecom:medium",
"water", "waterway"
Expand All @@ -111,6 +115,7 @@
"instruction": "The tag: {0} BEGINS WITH semicolons.",
"regex": ["^;"],
"tagNames": [
"addr:street",
"abutters", "access", "admin_level", "aerialway", "aeroway", "amenity",
"barrier", "bicycle", "boat", "border_type", "boundary", "bridge", "building", "construction",
"covered", "craft", "crossing", "cuisine", "cutting",
Expand Down Expand Up @@ -138,6 +143,7 @@
"instruction": "The tag: {0} ENDS WITH semicolons.",
"regex": [";$"],
"tagNames": [
"addr:street",
"abutters", "access", "admin_level", "aerialway", "aeroway", "amenity",
"barrier", "bicycle", "boat", "border_type", "boundary", "bridge", "building", "construction",
"covered", "craft", "crossing", "cuisine", "cutting",
Expand Down Expand Up @@ -165,6 +171,7 @@
"instruction": "The tag: {0} contains EMPTY SPACE in between semicolons.",
"regex": [";\\s*;"],
"tagNames": [
"addr:street",
"abutters", "access", "admin_level", "aerialway", "aeroway", "amenity",
"barrier", "bicycle", "boat", "border_type", "boundary", "bridge", "building", "construction",
"covered", "craft", "crossing", "cuisine", "cutting",
Expand All @@ -187,6 +194,70 @@
"wall", "waterway", "wheelchair", "wood"
],
"exceptions": []
}
},
{
"instruction": "The tag: {0} contains MULTIPLE VALUES separated by FORWARD SLASH '/'.",
"regex": ["[A-Z0-9]{5}\\s?/"],
"tagNames": [
"addr:street",
"aerialway",
"aeroway",
"highway",
"lanes",
"railway",
"route",
"waterway"],
"exceptions": [
{
"tagName": "addr:street",
"values": [
"Vehicular/ Peatonal"
]
}
]
},
{
"instruction": "The tag: {0} contains MULTIPLE VALUES separated by BACKSLASH '\\'.",
"regex": ["\\\\"],
"tagNames": [
"addr:street",
"aerialway",
"aeroway",
"highway",
"lanes",
"railway",
"route",
"waterway"],
"exceptions": []
},
{
"instruction": "The tag: {0} contains MULTIPLE VALUES separated by PLUS sign '+'.",
"regex": ["\\+"],
"tagNames": [
"addr:street",
"aerialway",
"aeroway",
"highway",
"lanes",
"railway",
"route",
"waterway"],
"exceptions": []
},
{
"instruction": "The tag: {0} contains QUESTION MARK '?'.",
"regex": ["\\?"],
"tagNames": [
"addr:street",
"aerialway",
"aeroway",
"highway",
"lanes",
"name",
"railway",
"route",
"waterway"],
"exceptions": []
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ relation:invalid-tags-check-regex-filter.json
line:invalid-tags-check-regex-filter.json
point:invalid-tags-check-regex-filter.json
node:invalid-tags-check-regex-filter.json
edge:invalid-tags-check-regex-filter.json
edge:invalid-tags-check-regex-filter.json
edge:invalid-edge-tags-check-regex-filter.json

0 comments on commit c4e17c9

Please sign in to comment.