Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undocumented field reference rtype #131

Open
FaFre opened this issue Dec 23, 2023 · 2 comments
Open

Undocumented field reference rtype #131

FaFre opened this issue Dec 23, 2023 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@FaFre
Copy link

FaFre commented Dec 23, 2023

There is an undocumented field in references called rtype for which no documentation exists. It is also used just for one field (restrictions):

{
    "type": "restrictions",
    "geometry": [
        "vertex"
    ],
    "usage": "manual",
    "reference": {
        "rtype": "restriction"
    },
    "label": "Turn Restrictions"
}

It would be nice to either document or drop this field, to have a consistent schema.

@tordans
Copy link
Collaborator

tordans commented Dec 23, 2023

I am assuming this is to trigger this special UI image

You could verify in the iD or Rapid codebase. A PR here would be great.

@1ec5
Copy link

1ec5 commented Dec 23, 2023

The reference property’s documentation doesn’t say it explicitly, but this object is supposed to list query parameters that the editor sends to taginfo or the OSM Wiki to look up documentation. Taginfo and the OSM Wiki need to know which tag or key corresponds to the preset or field.

In this case, we want the Turn Restrictions field to display documentation from the wiki’s “Relation:restriction” page via a taginfo relation type or from this data item via a MediaWiki API query for the permanent relation type ID property.1 It’s called rtype because iD used taginfo’s API long before it added support for data items.

I am assuming this is to trigger this special UI

That’s what the usage property is doing here.

Footnotes

  1. Ordinarily, one would expect a field to display documentation about a key, but restriction is primarily documented as a type of parking restriction rather than as a type of turn restriction, the much more common usage.

@tyrasd tyrasd added the documentation Improvements or additions to documentation label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants