diff --git a/plugins/input/csv/csv_datasource.cpp b/plugins/input/csv/csv_datasource.cpp index ce06ef274..2bb26d1f2 100644 --- a/plugins/input/csv/csv_datasource.cpp +++ b/plugins/input/csv/csv_datasource.cpp @@ -25,7 +25,6 @@ // boost #include #include -#include #include #include #include @@ -38,6 +37,7 @@ #include #include #include +#include #include // stl @@ -83,7 +83,6 @@ csv_datasource::csv_datasource(parameters const& params, bool bind) - creates opportunity to filter attributes by map query speed: - add properties for wkt/lon/lat at parse time - - remove boost::lexical_cast - add ability to pass 'filter' keyword to drop attributes at layer init - create quad tree on the fly for small/med size files - memory map large files for reading @@ -584,12 +583,11 @@ void csv_datasource::parse_csv(T& stream, break; } - try + if (mapnik::util::string2double(value,x)) { - x = boost::lexical_cast(value); parsed_x = true; } - catch(boost::bad_lexical_cast & ex) + else { std::ostringstream s; s << "CSV Plugin: expected a float value for longitude: could not parse row " @@ -617,12 +615,11 @@ void csv_datasource::parse_csv(T& stream, break; } - try + if (mapnik::util::string2double(value,y)) { - y = boost::lexical_cast(value); parsed_y = true; } - catch(boost::bad_lexical_cast & ex) + else { std::ostringstream s; s << "CSV Plugin: expected a float value for latitude: could not parse row " diff --git a/plugins/input/geos/geos_datasource.cpp b/plugins/input/geos/geos_datasource.cpp index 736b03e62..8dd6fef13 100644 --- a/plugins/input/geos/geos_datasource.cpp +++ b/plugins/input/geos/geos_datasource.cpp @@ -38,7 +38,6 @@ // boost #include #include -#include #include #include #include @@ -46,9 +45,6 @@ // geos #include -using boost::lexical_cast; -using boost::bad_lexical_cast; - using mapnik::box2d; using mapnik::coord2d; using mapnik::query; diff --git a/plugins/input/kismet/kismet_datasource.cpp b/plugins/input/kismet/kismet_datasource.cpp index ec4ab5fb7..ea5f6a2cd 100644 --- a/plugins/input/kismet/kismet_datasource.cpp +++ b/plugins/input/kismet/kismet_datasource.cpp @@ -37,7 +37,6 @@ // boost #include -#include #include #include #include @@ -51,9 +50,6 @@ #define MAX_KISMET_LINE 1024 // maximum length of a kismet command (assumed) #define KISMET_COMMAND "*NETWORK: \001%1024[^\001]\001 %1024s %d %lf %lf" -using boost::lexical_cast; -using boost::bad_lexical_cast; - using mapnik::datasource; using mapnik::parameters; diff --git a/plugins/input/raster/raster_datasource.cpp b/plugins/input/raster/raster_datasource.cpp index 7e8509133..f0d98c8b3 100644 --- a/plugins/input/raster/raster_datasource.cpp +++ b/plugins/input/raster/raster_datasource.cpp @@ -21,7 +21,6 @@ *****************************************************************************/ // boost -#include #include #include @@ -34,8 +33,6 @@ #include "raster_info.hpp" #include "raster_datasource.hpp" -using boost::lexical_cast; -using boost::bad_lexical_cast; using mapnik::layer_descriptor; using mapnik::featureset_ptr; using mapnik::query; diff --git a/plugins/input/sqlite/sqlite_utils.hpp b/plugins/input/sqlite/sqlite_utils.hpp index 6b9ca5ffb..d9074d09f 100644 --- a/plugins/input/sqlite/sqlite_utils.hpp +++ b/plugins/input/sqlite/sqlite_utils.hpp @@ -37,7 +37,6 @@ #include #include #include -#include #include // sqlite @@ -508,22 +507,12 @@ public: { if (! rs->column_isnull(0)) { - try - { - double xmin = boost::lexical_cast(rs->column_double(0)); - double ymin = boost::lexical_cast(rs->column_double(1)); - double xmax = boost::lexical_cast(rs->column_double(2)); - double ymax = boost::lexical_cast(rs->column_double(3)); - extent.init(xmin, ymin, xmax, ymax); - return true; - } - catch (boost::bad_lexical_cast& ex) - { - std::ostringstream ss; - ss << "SQLite Plugin: warning: could not determine extent from query: " - << "'" << s.str() << "' \n problem was: " << ex.what() << std::endl; - std::clog << ss.str(); - } + double xmin = rs->column_double(0); + double ymin = rs->column_double(1); + double xmax = rs->column_double(2); + double ymax = rs->column_double(3); + extent.init (xmin, ymin, xmax, ymax); + return true; } } } @@ -535,10 +524,10 @@ public: boost::shared_ptr rs(ds->execute_query(s.str())); if (rs->is_valid() && rs->step_next()) { - double xmin = rs->column_double (0); - double ymin = rs->column_double (1); - double xmax = rs->column_double (2); - double ymax = rs->column_double (3); + double xmin = rs->column_double(0); + double ymin = rs->column_double(1); + double xmax = rs->column_double(2); + double ymax = rs->column_double(3); extent.init (xmin, ymin, xmax, ymax); return true; } diff --git a/src/svg_parser.cpp b/src/svg_parser.cpp index 22a2ed766..eb8dcb5dc 100644 --- a/src/svg_parser.cpp +++ b/src/svg_parser.cpp @@ -36,7 +36,6 @@ #include #include #include -#include #include #include