Skip to content
Permalink
Browse files

raster transparency single band ranges, no data in save as, pipe to f…

…ile writer
  • Loading branch information
blazek committed Aug 22, 2012
1 parent 9c896b4 commit a2b6bcc73ce635e8d6ba1eb72e66878b83396421
@@ -21,7 +21,8 @@ public:

struct TransparentSingleValuePixel
{
double pixelValue;
double min;
double max;
double percentTransparent;
};

@@ -3954,10 +3954,10 @@ void QgisApp::saveAsRasterFile()
return;
}
// add projector if necessary
if ( d.outputCrs() != rasterLayer->dataProvider()->crs() )
if ( d.outputCrs() != rasterLayer->crs() )
{
QgsRasterProjector * projector = new QgsRasterProjector;
projector->setCRS( rasterLayer->dataProvider()->crs(), d.outputCrs() );
projector->setCRS( rasterLayer->crs(), d.outputCrs() );
if ( !pipe->set( projector ) )
{
QgsDebugMsg( "Cannot set pipe projector" );
@@ -3977,18 +3977,17 @@ void QgisApp::saveAsRasterFile()
delete pipe;
return;
}
projector->setCRS( rasterLayer->dataProvider()->crs(), d.outputCrs() );
projector->setCRS( rasterLayer->crs(), d.outputCrs() );
}

if ( !pipe->last() )
{
delete pipe;
return;
}
QgsRasterIterator iterator( pipe->last() );
fileWriter.setCreateOptions( d.createOptions() );

fileWriter.writeRaster( &iterator, d.nColumns(), d.nRows(), d.outputRectangle(), d.outputCrs(), &pd );
fileWriter.writeRaster( pipe, d.nColumns(), d.nRows(), d.outputRectangle(), d.outputCrs(), &pd );
delete pipe;
}
}

0 comments on commit a2b6bcc

Please sign in to comment.
You can’t perform that action at this time.