diff --git a/src/json/geojson_generator.cpp b/src/json/geojson_generator.cpp index 3732fc424..461f5b90f 100644 --- a/src/json/geojson_generator.cpp +++ b/src/json/geojson_generator.cpp @@ -20,6 +20,12 @@ * *****************************************************************************/ +// boost +#include +#include + +#if BOOST_VERSION >= 104700 + #include #include #include @@ -51,3 +57,37 @@ bool geometry_generator::generate(std::string & geojson, mapnik::geometry_contai } }} + +#else + +#include +#include +#include + +namespace mapnik { namespace json { + +class feature_generator { + public: + bool generate(std::string & geojson, mapnik::Feature const& f) + { + std::ostringstream s; + s << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100; + throw std::runtime_error("feature_generator::generate() requires at least boost 1.47 while your build was compiled against boost " + s.str()); + return false; + } +}; + +class geometry_generator { + public: + bool generate(std::string & geojson, mapnik::geometry_container const& g) + { + std::ostringstream s; + s << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100; + throw std::runtime_error("geometry_generator::generate() requires at least boost 1.47 while your build was compiled against boost " + s.str()); + return false; + } +}; + +}} + +#endif