Skip to content

Is linked_places always (for cities, towns and villages relations) the node representing the city (or at list the point where the name is displayed on the map) ? #3337

Answered by lonvia
Sliverside asked this question in Q&A
Discussion options

You must be logged in to vote

The linked place is the place node that most likely represents the same place as the boundary relation. So it is kind of what you are looking for. Nominatim uses some heuristics to determine the place. They use the wikidata tag, name, place type. If you are interested in the details, the code is here. The admin_center role is not really suitable as it usually points to the capital of the boundary which is not always the same thing. The label role is a more reliable candidate but also used relatively rarely.

Bonus question: linked_places seems to be unidirectional (a relation is linked to a node but the node isn't linked to it), why is it like that ?

There is an index on the column that …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Sliverside
Comment options

Answer selected by Sliverside
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants