-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Method-based tile feature ids (#924)
By default, `sourceFeature.featureIdFromElement()` is using `sourceFeature.id()`, but it allows overiding it in sub-classes, such as `OsmElement`. For OSM elements, the feature id encodes the origin of a vector tile feature - an OSM node, way, or relation. It uses the formula `{vector tile feature id} = {osm id} * 10 + {1 for node, 2 for way, 3 for relation}`. See #824 - A default implementation for `featureIdFromElement()` added to `sourceFeature` - A `OsmElement.type()` implemented in its sub-classes to provide the OSM element type. - `OsmElement.featureIdFromElement()` uses `type()` to implemented the above formula. - `source.featureIdFromElement()` is used instead of `source.id()` when converting a source element to a tile feature in `FeatureCollector`, `OpenMapTilesMapping`, and `OsmFeature`. - Additional constructors to avoid the use of `withId()` in tests
- Loading branch information
Showing
9 changed files
with
86 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters