Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion data/presets/area.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,28 @@
"polygon"
],
"name": "Area",
"matchScore": 0.1
"matchScore": 0.1,
"relation": {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is mostly registering my confusion... But is this area entry representing both closed ways with area tags and multipolygons?

If yes, would adding this relations structure interfere with applying it to closed ways?

https://github.com/ideditor/schema-builder/pull/174/changes#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5 has For relations, so I guess nonrelations should ignore this structure?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But is this area entry representing both closed ways with area tags and multipolygons?

yes, it's used by both

If yes, would adding this relations structure interfere with applying it to closed ways?

no, the code would just ignore this property for ways. Agree that it's a bit weird, but there's no other way to model it

"id": "multipolygon",
"allowDuplicateMembers": false,
"members": [
{
"role": "inner",
"roleLabel": "Inner",
"geometry": [
"line",
"area"
]
},
{
"role": "outer",
"roleLabel": "Outer",
"geometry": [
"line",
"area"
],
"min": 1
}
]
}
}
64 changes: 63 additions & 1 deletion data/presets/public_transport/stop_area.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,67 @@
"key": "public_transport",
"value": "stop_area"
},
"name": "Transit Stop Area"
"name": "Transit Stop Area",
"relation": {
"id": "public_transport",
"allowDuplicateMembers": false,
"members": [
{
"role": "stop",
"roleLabel": "Stop",
"geometry": [
"point",
"vertex"
],
"matchTags": [
{
"public_transport": "stop_position"
}
]
},
{
"role": "platform",
"roleLabel": "Platform",
"geometry": [
"point",
"vertex",
"line",
"area"
],
"matchTags": [
{
"public_transport": "platform"
}
]
},
{
"role": "entrance",
"roleLabel": "Entrance",
"matchTags": [
{
"entrance": "*"
}
],
"geometry": [
"vertex"
]
},
{
"role": "subway_entrance",
"roleLabel": "Subway Entrance",
"matchTags": [
{
"railway": "subway_entrance"
}
],
"geometry": [
"vertex"
]
},
{
"role": "",
"roleLabel": ""
Comment thread
k-yle marked this conversation as resolved.
}
]
}
}
66 changes: 65 additions & 1 deletion data/presets/type/boundary.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,69 @@
"tags": {
"type": "boundary"
},
"name": "Boundary"
"name": "Boundary",
"relation": {
"id": "boundary",
"allowDuplicateMembers": false,
"members": [
{
"role": "inner",
"roleLabel": "Inner",
"geometry": [
"line",
"area"
]
},
{
"role": "outer",
"roleLabel": "Outer",
"geometry": [
"line",
"area"
],
"min": 1
},
{
"role": "label",
"roleLabel": "Label",
"geometry": [
"point",
"vertex"
],
"matchTags": [
{
"place": "*"
}
],
"max": 1
},
{
"role": "admin_centre",
"roleLabel": "Admin Center",
"geometry": [
"point",
"vertex"
],
"matchTags": [
{
"place": "*"
}
],
"max": 1
},
{
"role": "subarea",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to promote and support these?

IIRC these are fairly bad ideas but I may misremember

"roleLabel": "Sub-Area",
"geometry": [
"area",
"relation"
],
"matchTags": [
{
"type": "boundary"
}
]
}
]
}
}
3 changes: 2 additions & 1 deletion data/presets/type/boundary/administrative.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
"key": "boundary",
"value": "administrative"
},
"name": "Administrative Boundary"
"name": "Administrative Boundary",
"relationCrossReference": "{type/boundary}"
}
47 changes: 46 additions & 1 deletion data/presets/type/destination_sign.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,50 @@
"terms": [
"exit sign"
],
"name": "Destination Sign"
"name": "Destination Sign",
"relation": {
"id": "destination_sign",
"allowDuplicateMembers": true,
"members": [
{
"role": "from",
"roleLabel": "From",
"geometry": [
"vertex",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://wiki.openstreetmap.org/wiki/Relation:destination_sign claims it may be also a node

(in such case can we express that line must be highway= but node may be tagless? )

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, that's not really possible. I'll just remove matchTags

"line"
]
},
{
"role": "intersection",
"roleLabel": "Intersection",
"geometry": [
"vertex"
],
"max": 1
},
{
"role": "to",
"roleLabel": "To",
"geometry": [
"vertex",
"line"
],
"matchTags": [
{
"highway": "*"
}
],
"min": 1,
"max": 1
},
{
"role": "sign",
"roleLabel": "Physical Sign",
"geometry": [
"point",
"vertex"
]
}
]
}
}
71 changes: 70 additions & 1 deletion data/presets/type/enforcement.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,74 @@
"tags": {
"type": "enforcement"
},
"name": "Enforcement"
"name": "Enforcement",
"relation": {
"id": "enforcement",
"allowDuplicateMembers": false,
"members": [
{
"role": "device",
"roleLabel": "Device",
"matchTags": [
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmmm

https://wiki.openstreetmap.org/wiki/Relation:enforcement gives example of red light camera placed on highway=traffic_signals without further tags

https://wiki.openstreetmap.org/wiki/Relation:enforcement#Example_5:_Distance_between_vehicles even wants to put it on tagless way

https://wiki.openstreetmap.org/wiki/Relation:enforcement#Example_7:_Height_check_before_tunnel also reccs tagsless device node

Copy link
Copy Markdown
Collaborator

@matkoniecz matkoniecz Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have no idea. I guess we should trust the wiki and remove matchTags ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it depends how this rules should be treated

  • general claims about which relations are valid
  • as guidance for editors

Because if it is guidance than being a bit prescriptive makes sense, but if violation of this rules should indicate invalidness of relation then they should be more relaxed and more matching what OSM Wiki permits and got used

{
"highway": "speed_camera"
},
{
"man_made": "surveillance"
},
{
"amenity ": "weighbridge"
}
]
},
{
"role": "force",
"roleLabel": "Force",
"matchTags": [
{
"highway": "speed_camera"
},
{
"man_made": "surveillance"
},
{
"amenity ": "weighbridge"
}
]
},
{
"role": "from",
"roleLabel": "From",
"geometry": [
"vertex",
"line"
],
"matchTags": [
{
"highway": "*"
}
]
},
{
"role": "to",
"roleLabel": "To",
"geometry": [
"vertex",
"line"
],
"matchTags": [
{
"highway": "*"
}
]
},
{
"role": "section",
"roleLabel": "Section",
"geometry": [
"line"
]
}
]
}
}
3 changes: 2 additions & 1 deletion data/presets/type/enforcement/maxspeed.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
"radar",
"speed camera"
],
"name": "Speed Limit Enforcement"
"name": "Speed Limit Enforcement",
"relationCrossReference": "{type/enforcement}"
}
3 changes: 2 additions & 1 deletion data/presets/type/multipolygon.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
},
"removeTags": {},
"name": "Multipolygon",
"matchScore": 0.1
"matchScore": 0.1,
"relationCrossReference": "{area}"
}
21 changes: 20 additions & 1 deletion data/presets/type/public_transport/stop_area_group.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,24 @@
"key": "public_transport",
"value": "stop_area_group"
},
"name": "Transit Stop Area Group"
"name": "Transit Stop Area Group",
"relation": {
"id": "public_transport",
"allowDuplicateMembers": false,
"members": [
{
"role": "",
"roleLabel": "",
"matchTags": [
{
"type": "public_transport",
"public_transport": "stop_area"
}
],
"geometry": [
"relation"
]
}
]
}
}
45 changes: 44 additions & 1 deletion data/presets/type/restriction.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,48 @@
"tags": {
"type": "restriction"
},
"name": "Restriction"
"name": "Restriction",
"relation": {
"id": "restriction",
"allowDuplicateMembers": false,
"members": [
{
"role": "from",
"roleLabel": "From",
"geometry": [
"line"
],
"matchTags": [
{
"highway": "*"
}
],
"min": 1,
"max": 1
},
{
"role": "via",
"roleLabel": "Via",
"geometry": [
"vertex",
"line"
],
"min": 1
},
{
"role": "to",
"roleLabel": "To",
"geometry": [
"line"
],
"matchTags": [
{
"highway": "*"
}
],
"min": 1,
"max": 1
}
]
}
}
Loading
Loading