Skip to content

add definitions for the structure of 31 relation presets#1538

Open
k-yle wants to merge 1 commit intomainfrom
kh/relations
Open

add definitions for the structure of 31 relation presets#1538
k-yle wants to merge 1 commit intomainfrom
kh/relations

Conversation

@k-yle
Copy link
Copy Markdown
Collaborator

@k-yle k-yle commented May 5, 2025

Closes ideditor/schema-builder#134, Closes openstreetmap/iD#9127, Closes #1033

Lets discuss the schema structure at ideditor/schema-builder#174 and the keep this PR for bike-shedding the tagging and labels.

The CI will fail until ideditor/schema-builder#174 is merged & released.

@tordans
Copy link
Copy Markdown
Collaborator

tordans commented Jun 9, 2025

Ping #1591 for another candidate for this schema addition.

@k-yle
Copy link
Copy Markdown
Collaborator Author

k-yle commented Sep 9, 2025

also associatedStreet - #997 (comment)

@matkoniecz matkoniecz added waitfor-other This issue or PR is blocked by something that is not covered by other waitfor-* labels and removed waitfor-pr-merge There is a PR for this issue which is waiting for review/merge labels Sep 9, 2025
@matkoniecz
Copy link
Copy Markdown
Collaborator

label changed per #1537 (comment)

@github-actions
Copy link
Copy Markdown

🍱 Your pull request preview is ready

Please use this preview to check your changes. Ideally use the test documentation template and document your test results by commenting on the PR. This will speed up the review process for everyone.

FYI, once this PR is merged, you can use the iD Editor Preview to test your changes in interaction with all other changes.

Comment thread data/presets/public_transport/stop_area.json
Comment thread package.json Outdated
@@ -20,7 +20,7 @@
"translations": "node scripts/translations.js"
},
"devDependencies": {
"@ideditor/schema-builder": "~6.5.1",
"@ideditor/schema-builder": "github:k-yle/schema-builder#kyle-deploy",
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.

this is temporary, to be changed on actual merge, right?

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.

yes, this is just to make testing possible - more details in ideditor/schema-builder#174 (comment)

Comment thread data/presets/type/route_master.json Outdated
Comment thread data/presets/type/restriction.json Outdated
Comment thread data/presets/type/restriction.json Outdated
},
{
"role": "stop_on_demand_exit_only",
"roleLabel": "Stop (Exit Only) (only stops on request)",
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.

Suggested change
"roleLabel": "Stop (Exit Only) (only stops on request)",
"roleLabel": "Stop (Exit Only, only stops on request)",

Though Inconsistent Capitalization Looks even worse now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
"roleLabel": "Stop (Exit Only) (only stops on request)",
"roleLabel": "Exit only stop (stops on demand)",

"on demand" should be equivalent to "on request"

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.

the problem with putting Exit only first, is that the list looks more chaotic.

To me, it seems a bit better when everything starts with Stop ...

image

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.

is this mockup? or is there way to test it in iD somehow?

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.

There's a lot of half-complete features in my fork of iD, which I will eventually make PRs for. Maybe I'll open some PRs tonight, but TLDR: no this can't be tested yet

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.

sounds like one more reason to process PRs you already opened :)

Comment thread data/presets/type/route.json Outdated
Comment thread data/presets/type/waterway.json Outdated
Comment thread data/presets/area.json
"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

{
"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

"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

Comment thread data/presets/type/site/traffic_signals.json Outdated
"Climbing Cliff"
],
"name": "Climbing Crag"
"name": "Climbing Crag",
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.

is there anywhere documentation for it?

https://wiki.openstreetmap.org/w/index.php?title=Tag:climbing%3Dcrag has nothing

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.

it's documented on Climbing#Crags. I know nothing about this topic, I just added it because of #1538 (comment)

}
]
},
{
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.

wait, is entry of elements mattering?

if no, then it probably should

if yes, then maybe put it higher before this exotic stop variants to make editing easier?

Comment thread data/presets/type/waterway.json Outdated
@matkoniecz

This comment was marked as resolved.

Copy link
Copy Markdown
Collaborator

@matkoniecz matkoniecz left a comment

Choose a reason for hiding this comment

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

in data/presets/type/route.json I would put "Part of the route" higher, so if selected from some dropdown it will be higher on the list, above exotic stop types

},
"name": "Route"
"name": "Route",
"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.

type=route is also for hiking routes etc

maybe it would be better to put that definition into one of specific public transport routes and reference it from there

"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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waitfor-other This issue or PR is blocked by something that is not covered by other waitfor-* labels waiting-for-schema-builder-change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Presets should enumerate expected roles Suggest 'from', 'to' and 'via' only for public transport routes control empty role of boundaries

4 participants