make get_overview_meta(band)
standalone method
This commit is contained in:
parent
37d5a32875
commit
7e6cc4cfac
2 changed files with 35 additions and 38 deletions
|
@ -44,6 +44,41 @@ using mapnik::view_transform;
|
|||
using mapnik::datasource_exception;
|
||||
using mapnik::feature_factory;
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
namespace {
|
||||
|
||||
void get_overview_meta(GDALRasterBand* band)
|
||||
{
|
||||
int band_overviews = band->GetOverviewCount();
|
||||
if (band_overviews > 0)
|
||||
{
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: " << band_overviews << " overviews found!";
|
||||
|
||||
for (int b = 0; b < band_overviews; b++)
|
||||
{
|
||||
GDALRasterBand * overview = band->GetOverview(b);
|
||||
MAPNIK_LOG_DEBUG(gdal) << "Overview= " << b
|
||||
<< " Width=" << overview->GetXSize()
|
||||
<< " Height=" << overview->GetYSize();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: No overviews found!";
|
||||
}
|
||||
|
||||
int bsx,bsy;
|
||||
double scale;
|
||||
band->GetBlockSize(&bsx, &bsy);
|
||||
scale = band->GetScale();
|
||||
|
||||
MAPNIK_LOG_DEBUG(gdal) << "Block=" << bsx << "x" << bsy
|
||||
<< " Scale=" << scale
|
||||
<< " Type=" << GDALGetDataTypeName(band->GetRasterDataType())
|
||||
<< "Color=" << GDALGetColorInterpretationName(band->GetColorInterpretation());
|
||||
}
|
||||
} // anonymous ns
|
||||
#endif
|
||||
gdal_featureset::gdal_featureset(GDALDataset& dataset,
|
||||
int band,
|
||||
gdal_query q,
|
||||
|
@ -646,36 +681,3 @@ feature_ptr gdal_featureset::get_feature_at_point(mapnik::coord2d const& pt)
|
|||
}
|
||||
return feature_ptr();
|
||||
}
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
void gdal_featureset::get_overview_meta(GDALRasterBand* band)
|
||||
{
|
||||
int band_overviews = band->GetOverviewCount();
|
||||
if (band_overviews > 0)
|
||||
{
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: " << band_overviews << " overviews found!";
|
||||
|
||||
for (int b = 0; b < band_overviews; b++)
|
||||
{
|
||||
GDALRasterBand * overview = band->GetOverview(b);
|
||||
MAPNIK_LOG_DEBUG(gdal) << "Overview= " << b
|
||||
<< " Width=" << overview->GetXSize()
|
||||
<< " Height=" << overview->GetYSize();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: No overviews found!";
|
||||
}
|
||||
|
||||
int bsx,bsy;
|
||||
double scale;
|
||||
band->GetBlockSize(&bsx, &bsy);
|
||||
scale = band->GetScale();
|
||||
|
||||
MAPNIK_LOG_DEBUG(gdal) << "Block=" << bsx << "x" << bsy
|
||||
<< " Scale=" << scale
|
||||
<< " Type=" << GDALGetDataTypeName(band->GetRasterDataType())
|
||||
<< "Color=" << GDALGetColorInterpretationName(band->GetColorInterpretation());
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -73,11 +73,6 @@ public:
|
|||
private:
|
||||
mapnik::feature_ptr get_feature(mapnik::query const& q);
|
||||
mapnik::feature_ptr get_feature_at_point(mapnik::coord2d const& p);
|
||||
|
||||
#ifdef MAPNIK_LOG
|
||||
void get_overview_meta(GDALRasterBand * band);
|
||||
#endif
|
||||
|
||||
GDALDataset & dataset_;
|
||||
mapnik::context_ptr ctx_;
|
||||
int band_;
|
||||
|
|
Loading…
Reference in a new issue