Skip to content
Permalink
Browse files

Fix heatmap rasters not correctly initialising with NODATA value

  • Loading branch information
nyalldawson committed May 5, 2013
1 parent 471dab1 commit 85a3a672880a3297157fc4056216715f81ab4f13
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/plugins/heatmap/heatmap.cpp
@@ -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 );

0 comments on commit 85a3a67

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