Skip to content

Commit 5c38ed8

Browse files
committed
Only allow choice of heatmap raster formats which support Float32 data types
1 parent 65aa1d5 commit 5c38ed8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/plugins/heatmap/heatmapgui.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ HeatmapGui::HeatmapGui( QWidget* parent, Qt::WFlags fl )
6363
{
6464
GDALDriver* nthDriver = GetGDALDriverManager()->GetDriver( i );
6565
char** driverMetadata = nthDriver->GetMetadata();
66-
if ( CSLFetchBoolean( driverMetadata, GDAL_DCAP_CREATE, false ) )
66+
// Only formats which allow creation of Float32 data types are valid
67+
if ( CSLFetchBoolean( driverMetadata, GDAL_DCAP_CREATE, false ) &&
68+
QString( nthDriver->GetMetadataItem( GDAL_DMD_CREATIONDATATYPES, NULL ) ).contains( "Float32" ) )
6769
{
6870
++myIndex;
6971
QString myLongName = nthDriver->GetMetadataItem( GDAL_DMD_LONGNAME );

0 commit comments

Comments
 (0)