remove inefficient and no longer used mapnik::raster constructor - refs #1516

This commit is contained in:
Dane Springmeyer 2012-10-03 18:22:18 -07:00
parent 4bc6b0c800
commit c27530ec7b
2 changed files with 1 additions and 11 deletions

View file

@ -42,12 +42,6 @@ public:
data_(width,height), data_(width,height),
premultiplied_alpha_(premultiplied_alpha) premultiplied_alpha_(premultiplied_alpha)
{} {}
raster(box2d<double> const& ext,image_data_32 const& data, bool premultiplied_alpha = false)
: ext_(ext),
data_(data),
premultiplied_alpha_(premultiplied_alpha)
{}
}; };
} }

View file

@ -224,14 +224,13 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q)
if (im_width > 0 && im_height > 0) if (im_width > 0 && im_height > 0)
{ {
mapnik::raster_ptr raster = boost::make_shared<mapnik::raster>(intersect, im_width, im_height); mapnik::raster_ptr raster = boost::make_shared<mapnik::raster>(intersect, im_width, im_height);
feature->set_raster(raster);
mapnik::image_data_32 & image = raster->data_; mapnik::image_data_32 & image = raster->data_;
image.set(0xffffffff); image.set(0xffffffff);
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Image Size=(" << im_width << "," << im_height << ")"; MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Image Size=(" << im_width << "," << im_height << ")";
MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Reading band=" << band_; MAPNIK_LOG_DEBUG(gdal) << "gdal_featureset: Reading band=" << band_;
typedef std::vector<int,int> pallete;
if (band_ > 0) // we are querying a single band if (band_ > 0) // we are querying a single band
{ {
if (band_ > nbands_) if (band_ > nbands_)
@ -256,7 +255,6 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q)
imageData, image.width(), image.height(), imageData, image.width(), image.height(),
GDT_Float32, 0, 0); GDT_Float32, 0, 0);
feature->set_raster(boost::make_shared<mapnik::raster>(intersect,image));
if (hasNoData) if (hasNoData)
{ {
feature->put("NODATA",nodata); 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, alpha->RasterIO(GF_Read, x_off, y_off, width, height, image.getBytes() + 3,
image.width(), image.height(), GDT_Byte, 4, 4 * image.width()); image.width(), image.height(), GDT_Byte, 4, 4 * image.width());
} }
feature->set_raster(raster);
} }
return feature; return feature;
} }