remove inefficient and no longer used mapnik::raster constructor - refs #1516
This commit is contained in:
parent
4bc6b0c800
commit
c27530ec7b
2 changed files with 1 additions and 11 deletions
|
@ -42,12 +42,6 @@ public:
|
|||
data_(width,height),
|
||||
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)
|
||||
{}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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<mapnik::raster>(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<int,int> 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<mapnik::raster>(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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue