Skip to content

Commit

Permalink
Fix heatmap rasters not correctly initialising with NODATA value
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 5, 2013
1 parent 471dab1 commit 85a3a67
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/heatmap/heatmap.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit 85a3a67

Please sign in to comment.