Skip to content

Commit

Permalink
Only allow choice of heatmap raster formats which support Float32 dat…
Browse files Browse the repository at this point in the history
…a types
  • Loading branch information
nyalldawson committed Jun 26, 2013
1 parent 65aa1d5 commit 5c38ed8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/heatmap/heatmapgui.cpp
Expand Up @@ -63,7 +63,9 @@ HeatmapGui::HeatmapGui( QWidget* parent, Qt::WFlags fl )
{
GDALDriver* nthDriver = GetGDALDriverManager()->GetDriver( i );
char** driverMetadata = nthDriver->GetMetadata();
if ( CSLFetchBoolean( driverMetadata, GDAL_DCAP_CREATE, false ) )
// Only formats which allow creation of Float32 data types are valid
if ( CSLFetchBoolean( driverMetadata, GDAL_DCAP_CREATE, false ) &&
QString( nthDriver->GetMetadataItem( GDAL_DMD_CREATIONDATATYPES, NULL ) ).contains( "Float32" ) )
{
++myIndex;
QString myLongName = nthDriver->GetMetadataItem( GDAL_DMD_LONGNAME );
Expand Down

0 comments on commit 5c38ed8

Please sign in to comment.