Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

More fixes

  • Loading branch information...
commit a2ab9b5588875648da09674ee73a60ef130f8f02 1 parent d12b4e3
@tmcw tmcw authored
View
7 plugins/input/gdal/gdal_datasource.cpp
@@ -25,6 +25,7 @@
#include "gdal_featureset.hpp"
// mapnik
+#include <boost/make_shared.hpp>
#include <mapnik/ptree_helpers.hpp>
#include <mapnik/geom_util.hpp>
@@ -199,6 +200,12 @@ gdal_datasource::~gdal_datasource()
{
}
+mapnik::statistics_ptr gdal_datasource::get_statistics() const
+{
+ if (! is_bound_) bind();
+ return boost::make_shared<mapnik::statistics>(stats_);
+}
+
datasource::datasource_t gdal_datasource::type() const
{
return datasource::Raster;
View
2  plugins/input/gdal/gdal_datasource.hpp
@@ -44,6 +44,7 @@ class gdal_datasource : public mapnik::datasource
mapnik::box2d<double> envelope() const;
boost::optional<mapnik::datasource::geometry_t> get_geometry_type() const;
mapnik::layer_descriptor get_descriptor() const;
+ mapnik::statistics_ptr get_statistics() const;
void bind() const;
private:
mutable mapnik::box2d<double> extent_;
@@ -56,6 +57,7 @@ class gdal_datasource : public mapnik::datasource
mutable double dy_;
mutable int nbands_;
mutable bool shared_dataset_;
+ mutable std::map<std::string, mapnik::parameters> stats_;
double filter_factor_;
inline GDALDataset* open_dataset() const;
};
View
2  plugins/input/ogr/ogr_datasource.cpp
@@ -429,7 +429,7 @@ layer_descriptor ogr_datasource::get_descriptor() const
return desc_;
}
-std::map<std::string, mapnik::parameters> ogr_datasource::get_statistics() const
+mapnik::statistics_ptr ogr_datasource::get_statistics() const
{
if (! is_bound_) bind();
return boost::make_shared<mapnik::statistics>(stats_);
Please sign in to comment.
Something went wrong with that request. Please try again.