OpenStreetMap 로고 OpenStreetMap

Searching relations

pangoSE님이 English로 2018년 9월 11일에 게시함. 최근 2018년 9월 15일에 업데이트됨.

Nominatim does NOT search route relations. I use taginfo & overpass.

The downside of overpass is that it:

  • does not use wildcards by default using the wizard
  • does not search case-insensitive by default using the wizard

Example of searching for the route Härnö Trail in Härnön: https://taginfo.openstreetmap.org/search?q=h%C3%A4rn%C3%B6+trail#values -> click the orange -> click overpass symbol -> from overpass you can click the map object and -> click to osm.org from there

Alternatively you can download Härnön in JOSM and search for the relation there. (much easier if you know where it is beforehand)

iD does not yet show relations, only memberhip of relations on objects. Also iD lacks a way to check that your edit did not break (the continuity of) one or more relations.

(edited to remove the incorrect assumption that it does not accept wildcards and to specifically mention route relations)

이메일 아이콘 Bluesky 아이콘 Facebook 아이콘 LinkedIn 아이콘 마스토돈 아이콘 텔레그램 아이콘 X 아이콘

토론

2018년 9월 11일 11:12TomH님의 의견

It is completely untrue that Nominatim doesn’t search relations - the first result for https://nominatim.openstreetmap.org/search.php?q=Broxbourne is https://nominatim.openstreetmap.org/details.php?place_id=198582074 which is, as the page clearly says, a result for osm.org/relation/2677978.

2018년 9월 11일 13:21ikonor님의 의견

Waymarked Trails can search for route relations: https://hiking.waymarkedtrails.org/#search?query=H%C3%A4rn%C3%B6

2018년 9월 11일 14:30mmd님의 의견

overpass * does not search case-insensitive

That’s also incorrect. Please check out the documentation first next time before posting.

2018년 9월 13일 15:18SomeoneElse님의 의견

I’m not sure why everyone seems to be shooting the messenger here :)

Whilst it’s true that that Nominatim can be used to search for relations (in fact most of the time I search for places in OSM I’ll be returned a relation) it’s also true that relations of the type that the author was looking for here won’t be returned by Nominatim (which is fair enough - it’s designed as a place search engine, not a hiking trail search).

Also, Overpass’ wildcard support seems to have been written by Incy Wincy Spider, and using Nominatim to create Overpass queries for you is definitely far easier than trying to remember Overpass’ syntax without crib notes - it’s how I always do searches like this.

All in all I’m sure that this diary entry will be useful to lots of people - I’m not sure why there’s all the negativity.

2018년 9월 13일 15:28mmd님의 의견

Case insensitive wildcard search for a relation name isn’t really that difficult:

rel["name"~"härnö trail",i];
out geom;

2018년 9월 13일 20:41pangoSE님의 의견

@TomH thanks for the example. I was referring to relations of the type route. See https://github.com/openstreetmap/Nominatim/issues/413

@mmd Thanks for the tip about case insensitive search. I did not look it up, but referred to the default when using the wizard on https://overpass-turbo.eu/ (the wizard could definitely be improved with a checkbox for case-insensitive search ticked by default)

Looking for the issue referenced above I found http://ra.osmsurround.org/searchRelation, but unfortunately it lacks information about how recent a snapshot its search is running on and fails to find the relation in question which I added a couple of weeks ago: http://ra.osmsurround.org/searchRelation?name=h%C3%A4rn%C3%B6&relationType=route&route=&ref=&network=&operator=

2018년 9월 13일 20:43pangoSE님의 의견

@ikonor thanks for the tip. I recently changed the route from =running to =hiking;running so now it shows up on waymarked trails as well. I contacted the author of waymarked trails to enquire about the possibility of adding a “running” subsite and she was positive about that. :)

댓글을 남기려면 로그인하세요