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

View file

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