onthegomap / planetiler

Flexible tool to build planet-scale vector tilesets from OpenStreetMap data fast
Apache License 2.0
1.36k stars 109 forks source link

Method-based tile feature ids #924

Closed zstadler closed 3 months ago

zstadler commented 3 months ago

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