Add an option to automatically assign ids to features

This commit is contained in:
Eric Fischer
2018-07-26 15:08:47 -07:00
parent 50b1eadf87
commit 6f295f29fc
8 changed files with 2235 additions and 1 deletions
+7
View File
@@ -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++) {