Skip to content
Permalink
Browse files

Correctly create raster for heatmap output

Incorrect creation of geo transform was leading to invalid raster
outputs and many "creating warped vrt" log messages
  • Loading branch information
nyalldawson committed Jul 20, 2017
1 parent 6e49403 commit 5241c74c6ccaeea5a85165350c67762747684b65
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/analysis/raster/qgskde.cpp
@@ -227,7 +227,7 @@ int QgsKernelDensityEstimation::radiusSizeInPixels( double radius ) const

bool QgsKernelDensityEstimation::createEmptyLayer( GDALDriverH driver, const QgsRectangle &bounds, int rows, int columns ) const
{
double geoTransform[6] = { bounds.xMinimum(), mPixelSize, 0, bounds.yMinimum(), 0, mPixelSize };
double geoTransform[6] = { bounds.xMinimum(), mPixelSize, 0, bounds.yMaximum(), 0, -mPixelSize };
GDALDatasetH emptyDataset = GDALCreate( driver, mOutputFile.toUtf8(), columns, rows, 1, GDT_Float32, nullptr );
if ( !emptyDataset )
return false;

0 comments on commit 5241c74

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