Accept features with null properties in geobuf

This commit is contained in:
Erica Fischer
2022-11-21 13:45:04 -08:00
parent 2419350e09
commit 9f831bfca5
+6
View File
@@ -154,6 +154,11 @@ void readFeature(const FlatGeobuf::Feature *feature, long long feature_sequence_
std::vector<std::string> full_keys;
std::vector<serial_val> full_values;
if (feature == NULL) {
fprintf(stderr, "Can't happen: null geobuf feature\n");
exit(EXIT_IMPOSSIBLE);
}
if (feature->properties() != NULL) {
// assume tabular schema with columns in header
size_t p_pos = 0;
while (p_pos < feature->properties()->size()) {
@@ -247,6 +252,7 @@ void readFeature(const FlatGeobuf::Feature *feature, long long feature_sequence_
full_keys.push_back(h_column_names[col_idx]);
full_values.push_back(sv);
}
}
sf.full_keys = full_keys;
sf.full_values = full_values;