From 120b8f4e41d70b7ff7e85b59d1906bbc9332d17f Mon Sep 17 00:00:00 2001 From: Patrick M Young Date: Fri, 1 Nov 2024 13:27:05 -0600 Subject: [PATCH] Fixes bool atrributes coming from FGB files (#289) Fixes https://github.com/felt/tippecanoe/issues/180. Co-authored-by: Patrick Young --- flatgeobuf.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flatgeobuf.cpp b/flatgeobuf.cpp index 974f4fc2..cf72d671 100644 --- a/flatgeobuf.cpp +++ b/flatgeobuf.cpp @@ -177,7 +177,11 @@ void readFeature(const FlatGeobuf::Feature *feature, long long feature_sequence_ sv.type = mvt_bool; uint8_t 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); } else if (col_type == FlatGeobuf::ColumnType_Short) { sv.type = mvt_sint;