mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Fix heatmap rasters not correctly initialising with NODATA value
This commit is contained in:
parent
471dab184a
commit
85a3a67288
@ -142,11 +142,13 @@ void Heatmap::run()
|
||||
|
||||
float* line = ( float * ) CPLMalloc( sizeof( float ) * columns );
|
||||
for ( int i = 0; i < columns ; i++ )
|
||||
{
|
||||
line[i] = NO_DATA;
|
||||
}
|
||||
// Write the empty raster
|
||||
for ( int i = 0; i < rows ; i++ )
|
||||
{
|
||||
poBand->RasterIO( GF_Write, 0, 0, columns, 1, line, columns, 1, GDT_Float32, 0, 0 );
|
||||
poBand->RasterIO( GF_Write, 0, i, columns, 1, line, columns, 1, GDT_Float32, 0, 0 );
|
||||
}
|
||||
|
||||
CPLFree( line );
|
||||
|
Loading…
x
Reference in New Issue
Block a user