-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Encode OSM node/way/relation in vector tile feature id #826
Conversation
Full logs: https://github.com/onthegomap/planetiler/actions/runs/9711262625 |
Quality Gate passedIssues Measures |
We may consider adding a |
- Create a default implementation for `featureId()` in `sourceFeature` - Implement `featureId()` differently for `OsmElement`. - Remove previous implementations of featureId()` elsewhere. - Replace `source.id()` with `source.featureId()` in `FeatureCollector`, `OpenMapTilesMapping`, `OsmFeature`. - Add `id` and `withId()` to `TestUtil.TopoGeometry.ComparableFeature` and updates the applicable tests. [Based on onthegomap#826] Branch status: - Branch and tests are passing compilation - Output tiles have the new Feature ID values for OSM elements - Two tests are failing and were temporarily disabled: `testPreprocessOsmNodesAndWays` and `integrationTest`
Finish incomplete merger of `TestUtils.java` from onthegomap#826 Update expected ids in `OsmQaTilesTest.java` Branch status: - Branch and tests are passing compilation - Output tiles have the new Feature ID values for OSM elements - One test is failing and was temporarily disabled: `testPreprocessOsmNodesAndWays`
- Create a default implementation for `featureId()` in `sourceFeature` - Implement `featureId()` differently for `OsmElement`. - Remove previous implementations of featureId()` elsewhere. - Replace `source.id()` with `source.featureId()` in `FeatureCollector`, `OpenMapTilesMapping`, `OsmFeature`. - Add `id` and `withId()` to `TestUtil.TopoGeometry.ComparableFeature` and updates the applicable tests. [Based on onthegomap#826] Branch status: - Branch and tests are passing compilation - Output tiles have the new Feature ID values for OSM elements - Two tests are failing and were temporarily disabled: `testPreprocessOsmNodesAndWays` and `integrationTest`
Finish incomplete merger of `TestUtils.java` from onthegomap#826 Update expected ids in `OsmQaTilesTest.java` Branch status: - Branch and tests are passing compilation - Output tiles have the new Feature ID values for OSM elements - One test is failing and was temporarily disabled: `testPreprocessOsmNodesAndWays`
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
Quality Gate passedIssues Measures |
Encode what source a feature comes from in its ID:
By default
--feature-source-id-multiplier=10
but you can set to--feature-source-id-multiplier=false
to disable.See #824