mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Add an option to automatically assign ids to features
This commit is contained in:
@@ -387,6 +387,13 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf) {
|
||||
sf.geometry = fix_polygon(sf.geometry);
|
||||
}
|
||||
|
||||
if (!sf.has_id) {
|
||||
if (additional[A_GENERATE_IDS]) {
|
||||
sf.has_id = true;
|
||||
sf.id = sf.seq + 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (sst->want_dist) {
|
||||
std::vector<unsigned long long> locs;
|
||||
for (size_t i = 0; i < sf.geometry.size(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user