Permalink
Browse files

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

  • Loading branch information...
1 parent 4bc6b0c commit c27530ec7bfa810c34160e89aa82877840c95199 Dane Springmeyer committed Oct 4, 2012
Showing with 1 addition and 11 deletions.
  1. +0 −6 include/mapnik/raster.hpp
  2. +1 −5 plugins/input/gdal/gdal_featureset.cpp
@@ -42,12 +42,6 @@ class raster : private boost::noncopyable
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;
}

0 comments on commit c27530e

Please sign in to comment.