More fixes
This commit is contained in:
parent
d12b4e322f
commit
a2ab9b5588
3 changed files with 10 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -44,6 +44,7 @@ public:
|
|||
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 @@ private:
|
|||
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;
|
||||
};
|
||||
|
|
|
@ -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_);
|
||||
|
|
Loading…
Reference in a new issue