From 8608ea3308b00a0e2473e48d26f7bca149443a05 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 10 Feb 2015 18:50:27 -0800 Subject: [PATCH] only enable geojson memory mapped files if SHAPE_MEMORY_MAPPED_FILE defined (TODO: rename this define) - refs #2698 --- plugins/input/geojson/geojson_datasource.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/input/geojson/geojson_datasource.cpp b/plugins/input/geojson/geojson_datasource.cpp index d1b35d54e..774c8d248 100644 --- a/plugins/input/geojson/geojson_datasource.cpp +++ b/plugins/input/geojson/geojson_datasource.cpp @@ -29,7 +29,6 @@ // boost #include #include -#include // mapnik #include #include @@ -50,7 +49,10 @@ #include #include // boost.geometry - register box2d +#if defined(SHAPE_MEMORY_MAPPED_FILE) +#include #include +#endif using mapnik::datasource; using mapnik::parameters; @@ -131,7 +133,7 @@ geojson_datasource::geojson_datasource(parameters const& params) else { cache_features_ = *params.get("cache_features", true); -#if 0 +#if defined(SHAPE_MEMORY_MAPPED_FILE) mapnik::util::file file(filename_); if (!file.open()) {