From 4e2d2c67b03f99e9b86cf85d11bd108acd1e7010 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 23 Aug 2012 09:30:51 -0700 Subject: [PATCH] double csv parsing speeds when handling geojson encoded geometries - refs #1436 --- plugins/input/csv/csv_datasource.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/input/csv/csv_datasource.cpp b/plugins/input/csv/csv_datasource.cpp index 3290a41ff..2350f160f 100644 --- a/plugins/input/csv/csv_datasource.cpp +++ b/plugins/input/csv/csv_datasource.cpp @@ -433,6 +433,7 @@ void csv_datasource::parse_csv(T& stream, mapnik::transcoder tr(desc_.get_encoding()); mapnik::wkt_parser parse_wkt; + mapnik::json::geometry_parser parse_json; while (std::getline(stream,csv_line,newline)) { @@ -574,7 +575,7 @@ void csv_datasource::parse_csv(T& stream, { break; } - if (mapnik::json::from_geojson(value, feature->paths())) + if (parse_json.parse(value.begin(),value.end(), feature->paths())) { parsed_json = true; }