[openstreetmap/openstreetmap-website] Allow usage of object filter path as alternative to object ID (Issue #3499)

Andreas Hubel notifications at github.com
Sat Mar 12 19:05:14 UTC 2022


### Description

Right now users use URLs with IDs to reference individual objects on osm.org, e.g. https://www.openstreetmap.org/relation/23092 – which might break when the object changes, especially when used for nodes or ways instead of relations.

We could allow addressing via other attributes like `ref`, `network` etc – e.g. for the object above one could think about an URL like `https://www.openstreetmap.org/relation/[ref=A+555][network=BAB]`,  or `https://www.openstreetmap.org/relation/network=BAB/ref=A+555`, or `https://www.openstreetmap.org/relation/?network=BAB&ref=A+555`

Right now such an URL leads to a 404, but we could modify the rails app to delegate such a request to `query.openstreetmap.org` which find the corresponding object(s) and redirects the user back osm.org, now with the current ID of that object.

Actually query.openstreetmap.org already supports [this feature](https://wiki.openstreetmap.org/wiki/Overpass_API/Permanent_ID):

`https://query.openstreetmap.org/query-features?data=[out:custom];{insert-query-from-url-here};out;`
e.g. 
https://query.openstreetmap.org/query-features?data=[out:custom];relation[ref="A+555"][network=BAB];out;
which redirects to
https://www.openstreetmap.org/relation/23092

What's your opinion? 
Is it worth to create a pull request implementing the corresponding changes in the rails app?



### Screenshots

_No response_

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/3499
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/3499 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220312/33daf018/attachment.htm>


More information about the rails-dev mailing list