mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Check for strings vs numbers in CSV attributes
This commit is contained in:
+6
-1
@@ -74,12 +74,17 @@ void parse_geocsv(std::vector<struct serialization_state> &sst, std::string fnam
|
|||||||
|
|
||||||
for (size_t i = 0; i < line.size(); i++) {
|
for (size_t i = 0; i < line.size(); i++) {
|
||||||
if (i != (size_t) latcol && i != (size_t) loncol) {
|
if (i != (size_t) latcol && i != (size_t) loncol) {
|
||||||
full_keys.push_back(header[i]);
|
line[i] = csv_dequote(line[i]);
|
||||||
|
|
||||||
serial_val sv;
|
serial_val sv;
|
||||||
|
if (is_number(line[i])) {
|
||||||
|
sv.type = mvt_double;
|
||||||
|
} else {
|
||||||
sv.type = mvt_string;
|
sv.type = mvt_string;
|
||||||
|
}
|
||||||
sv.s = line[i];
|
sv.s = line[i];
|
||||||
|
|
||||||
|
full_keys.push_back(header[i]);
|
||||||
full_values.push_back(sv);
|
full_values.push_back(sv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user