mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Fixes bool atrributes coming from FGB files (#289)
Fixes https://github.com/felt/tippecanoe/issues/180. Co-authored-by: Patrick Young <pyoung@snapchat.com>
This commit is contained in:
co-authored by
Patrick Young
parent
28efc40e6e
commit
120b8f4e41
+5
-1
@@ -177,7 +177,11 @@ void readFeature(const FlatGeobuf::Feature *feature, long long feature_sequence_
|
|||||||
sv.type = mvt_bool;
|
sv.type = mvt_bool;
|
||||||
uint8_t bool_val;
|
uint8_t bool_val;
|
||||||
memcpy(&bool_val, feature->properties()->data() + p_pos + sizeof(uint16_t), sizeof(bool_val));
|
memcpy(&bool_val, feature->properties()->data() + p_pos + sizeof(uint16_t), sizeof(bool_val));
|
||||||
sv.s = std::to_string(bool_val);
|
if (bool_val) {
|
||||||
|
sv.s = "true";
|
||||||
|
} else {
|
||||||
|
sv.s = "false";
|
||||||
|
}
|
||||||
p_pos += sizeof(uint16_t) + sizeof(bool_val);
|
p_pos += sizeof(uint16_t) + sizeof(bool_val);
|
||||||
} else if (col_type == FlatGeobuf::ColumnType_Short) {
|
} else if (col_type == FlatGeobuf::ColumnType_Short) {
|
||||||
sv.type = mvt_sint;
|
sv.type = mvt_sint;
|
||||||
|
|||||||
Reference in New Issue
Block a user