(Non-multipolygon) relation support #360
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR enables tilemaker to take account of relations in Lua scripts. There are two new (but linked) pieces of functionality:
relation_scan_function
reads relation tags and memberships into memory, so that they can be considered by member ways inway_function
relation_function
constructs discrete geometries from entire relations, including as multilinestringsThis means tilemaker can now support route and boundary relations, among others. Support for boundary relations is added to the OMT-compatible Lua script in this PR. The new functions are documented in a separate RELATIONS.md file.
Each relation type is sui generis so I anticipate this won't be the end of the story! As this evolves we may need to change the Lua interface for relations (semver purists look away now ;) ). But this should cope with the majority of cases.
The following aren't supported in this PR and could be considered at a later date: