mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-06 10:25:41 +02:00
Accept features with null properties in geobuf
This commit is contained in:
@@ -154,6 +154,11 @@ void readFeature(const FlatGeobuf::Feature *feature, long long feature_sequence_
|
|||||||
std::vector<std::string> full_keys;
|
std::vector<std::string> full_keys;
|
||||||
std::vector<serial_val> full_values;
|
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
|
// assume tabular schema with columns in header
|
||||||
size_t p_pos = 0;
|
size_t p_pos = 0;
|
||||||
while (p_pos < feature->properties()->size()) {
|
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_keys.push_back(h_column_names[col_idx]);
|
||||||
full_values.push_back(sv);
|
full_values.push_back(sv);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sf.full_keys = full_keys;
|
sf.full_keys = full_keys;
|
||||||
sf.full_values = full_values;
|
sf.full_values = full_values;
|
||||||
|
|||||||
Reference in New Issue
Block a user