avoid compiler warning by only adding 'get_overview_meta' in debug mode

This commit is contained in:
Dane Springmeyer 2010-12-20 19:17:56 +00:00
parent 20349d42f6
commit 9700ad4fb2
2 changed files with 4 additions and 8 deletions

View file

@ -373,29 +373,24 @@ feature_ptr gdal_featureset::get_feature_at_point(mapnik::coord2d const& pt)
return feature_ptr();
}
#ifdef MAPNIK_DEBUG
void gdal_featureset::get_overview_meta(GDALRasterBand * band)
{
int band_overviews = band->GetOverviewCount();
if (band_overviews > 0)
{
#ifdef MAPNIK_DEBUG
std::clog << "GDAL Plugin: "<< band_overviews << " overviews found!" << std::endl;
#endif
for (int b = 0; b < band_overviews; b++)
{
GDALRasterBand * overview = band->GetOverview (b);
#ifdef MAPNIK_DEBUG
std::clog << boost::format("GDAL Plugin: Overview=%d Width=%d Height=%d")
% b % overview->GetXSize() % overview->GetYSize() << std::endl;
#endif
}
}
else
{
#ifdef MAPNIK_DEBUG
std::clog << "GDAL Plugin: No overviews found!" << std::endl;
#endif
}
int bsx,bsy;
@ -403,10 +398,9 @@ void gdal_featureset::get_overview_meta(GDALRasterBand * band)
band->GetBlockSize(&bsx,&bsy);
scale = band->GetScale();
#ifdef MAPNIK_DEBUG
std::clog << boost::format("GDAL Plugin: Block=%dx%d Scale=%f Type=%s Color=%s") % bsx % bsy % scale
% GDALGetDataTypeName(band->GetRasterDataType())
% GDALGetColorInterpretationName(band->GetColorInterpretation()) << std::endl;
#endif
}
#endif

View file

@ -46,7 +46,9 @@ class gdal_featureset : public mapnik::Featureset
private:
mapnik::feature_ptr get_feature(mapnik::query const& q);
mapnik::feature_ptr get_feature_at_point(mapnik::coord2d const& p);
#ifdef MAPNIK_DEBUG
void get_overview_meta(GDALRasterBand * band);
#endif
GDALDataset & dataset_;
int band_;
gdal_query gquery_;