From c27530ec7bfa810c34160e89aa82877840c95199 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 3 Oct 2012 18:22:18 -0700 Subject: [PATCH] remove inefficient and no longer used mapnik::raster constructor - refs #1516 --- include/mapnik/raster.hpp | 6 ------ plugins/input/gdal/gdal_featureset.cpp | 6 +----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/include/mapnik/raster.hpp b/include/mapnik/raster.hpp index 1337139cc..e4b4ec288 100644 --- a/include/mapnik/raster.hpp +++ b/include/mapnik/raster.hpp @@ -42,12 +42,6 @@ public: data_(width,height), premultiplied_alpha_(premultiplied_alpha) {} - raster(box2d const& ext,image_data_32 const& data, bool premultiplied_alpha = false) - : ext_(ext), - data_(data), - premultiplied_alpha_(premultiplied_alpha) - {} - }; } diff --git a/plugins/input/gdal/gdal_featureset.cpp b/plugins/input/gdal/gdal_featureset.cpp index 0addfc8aa..08fef0f6b 100644 --- a/plugins/input/gdal/gdal_featureset.cpp +++ b/plugins/input/gdal/gdal_featureset.cpp @@ -224,14 +224,13 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q) if (im_width > 0 && im_height > 0) { mapnik::raster_ptr raster = boost::make_shared(intersect, im_width, im_height); + feature->set_raster(raster); mapnik::image_data_32 & image = raster->data_; image.set(0xffffffff); MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Image Size=(" << im_width << "," << im_height << ")"; MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Reading band=" << band_; - typedef std::vector pallete; - if (band_ > 0) // we are querying a single band { if (band_ > nbands_) @@ -256,7 +255,6 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q) imageData, image.width(), image.height(), GDT_Float32, 0, 0); - feature->set_raster(boost::make_shared(intersect,image)); if (hasNoData) { feature->put("NODATA",nodata); @@ -489,8 +487,6 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q) alpha->RasterIO(GF_Read, x_off, y_off, width, height, image.getBytes() + 3, image.width(), image.height(), GDT_Byte, 4, 4 * image.width()); } - - feature->set_raster(raster); } return feature; }