shape input: before boost 1_36 use convenience.hpp

This commit is contained in:
Dane Springmeyer 2009-06-08 08:22:02 +00:00
parent bc463c2a75
commit 9bcdda31d2

View file

@ -26,9 +26,14 @@
#include <mapnik/geom_util.hpp>
// boost
#include <boost/version.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/filesystem/operations.hpp>
#if BOOST_VERSION < 103600
#include <boost/filesystem/convenience.hpp>
#endif
#include "shape_featureset.hpp"
#include "shape_index_featureset.hpp"
#include "shape.hpp"
@ -60,7 +65,11 @@ shape_datasource::shape_datasource(const parameters &params)
shape_name_ = *file;
boost::filesystem::path path(shape_name_);
#if BOOST_VERSION >= 103600
path.replace_extension("");
#else
path = boost::filesystem::change_extension(path,"");
#endif
shape_name_ = path.string();
if (!boost::filesystem::exists(shape_name_ + ".shp")) throw datasource_exception(shape_name_ + ".shp does not exist");