[openstreetmap/openstreetmap-website] Automatically generate PTv2 relations name (Issue #4033)
Dimitar
notifications at github.com
Sun May 14 13:51:20 UTC 2023
### Problem
Currently most PTv2 relations have `network`, `ref`, `route`, `from`, `via` and `to` tags. Regardless of these tags the OSM website shows only the ref of these relations. Using that information it is possible to generate a name like iD and JOSM do.
To make it easier, you can use the strings from iD's implementation (https://github.com/openstreetmap/iD/pull/8276/files):
```
display_name:
direction: "{direction}"
from_to: "from {from} to {to}"
from_to_via: "from {from} to {to} via {via}"
network_direction: "{network} {direction}"
network_from_to: "{network} from {from} to {to}"
network_from_to_via: "{network} from {from} to {to} via {via}"
ref: "{ref}"
ref_direction: "{ref} {direction}"
ref_from_to: "{ref} from {from} to {to}"
ref_from_to_via: "{ref} from {from} to {to} via {via}"
network_ref: "{network} {ref}"
network_ref_direction: "{network} {ref} {direction}"
network_ref_from_to: "{network} {ref} from {from} to {to}"
network_ref_from_to_via: "{network} {ref} from {from} to {to} via {via}"
```
Example elements for testing:
https://www.openstreetmap.org/relation/13892501
https://www.openstreetmap.org/relation/13892502
https://www.openstreetmap.org/relation/13892503 (see members section)
### Description
_No response_
### Screenshots


--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/4033
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/4033 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230514/be8c229a/attachment.htm>
More information about the rails-dev
mailing list