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

Introduce separation of names from linked places #2637

Merged
merged 6 commits into from
Mar 17, 2022

Conversation

lonvia
Copy link
Member

@lonvia lonvia commented Mar 17, 2022

Until now, when a place node was linked to a admin boundary, the names of both objects simply got merged. This has two major disadvantages:

This PR changes the merge process. Names from the place node will be added with the prefix _place_ added to the key into the name hstore, if (and only if) the names differ in some way. Either the value is another one or the key is completely missing. These artificial names are then removed again before reindexing a boundary relation. The prefixed and non-prefixed names are transparently merged before creating display names or sending them back via the API, so that the behaviour looks the same from an API user point of view. Only when place node and boundary disagree on the value of a name tag, the name on the place node is now also available with the _place_ prefix.

lonvia added 6 commits March 16, 2022 16:38
This keeps the names tracable and ensures that all names are searchable
when they differ. Do not keep names when they are exactly the same
to save some space. Linked names are cleaned out before relinking.
These have returned a 0 until now.
Convert the '_place_*' entries back to normal entries before
returning them in the 'namedetails' section. If the name field is
duplicated, kept the '_place_*' notation. This preserves the previous
behaviour before _place_ names were introduces but adds the additional
names from the linked place for reference.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant