mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-02-24 02:41:15 +00:00
Fix off-by-one error in attributes, and canonicalize number formats
This commit is contained in:
parent
fa3e7cadd9
commit
98f025fa35
@ -204,7 +204,7 @@ void parse_shapefile(struct serialization_state *sst, std::string fname, int lay
|
||||
std::vector<std::string> full_keys;
|
||||
std::vector<serial_val> full_values;
|
||||
|
||||
unsigned char *dbp = db;
|
||||
unsigned char *dbp = db + 1;
|
||||
for (size_t i = 0; i < columns.size(); i++) {
|
||||
std::string s = std::string((char *) dbp, column_widths[i]);
|
||||
dbp += column_widths[i];
|
||||
@ -219,6 +219,7 @@ void parse_shapefile(struct serialization_state *sst, std::string fname, int lay
|
||||
|
||||
if (column_types[i] == 'F' || column_types[i] == 'N') {
|
||||
sv.type = mvt_double;
|
||||
sv.s = milo::dtoa_milo(atof(sv.s.c_str()));
|
||||
} else if (column_types[i] == 'L') {
|
||||
sv.type = mvt_bool;
|
||||
if (s == "Y" || s == "y" || s == "T" || s == "t") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user