Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

double csv parsing speeds when handling geojson encoded geometries - …

…refs #1436
  • Loading branch information...
commit 4e2d2c67b03f99e9b86cf85d11bd108acd1e7010 1 parent f4a74d0
@springmeyer springmeyer authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  plugins/input/csv/csv_datasource.cpp
View
3  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<std::string::const_iterator> 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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.