Skip to content

Commit

Permalink
Correctly create raster for heatmap output
Browse files Browse the repository at this point in the history
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 5241c74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/analysis/raster/qgskde.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 5241c74

Please sign in to comment.