Skip to content

Commit

Permalink
[processing] Fix rasterlayerzonalstats when input raster has no CRS
Browse files Browse the repository at this point in the history
Use "area" as the area column name instead of an empty name.
  • Loading branch information
agiudiceandrea authored and github-actions[bot] committed Aug 7, 2021
1 parent cbec12e commit 057a5a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmrasterzonalstats.cpp
Expand Up @@ -177,7 +177,7 @@ QVariantMap QgsRasterLayerZonalStatsAlgorithm::processAlgorithm( const QVariantM
{
QgsFields outFields;
outFields.append( QgsField( QStringLiteral( "zone" ), QVariant::Double, QString(), 20, 8 ) );
outFields.append( QgsField( areaUnit.replace( QStringLiteral( "²" ), QStringLiteral( "2" ) ), QVariant::Double, QString(), 20, 8 ) );
outFields.append( QgsField( areaUnit.isEmpty() ? "area" : areaUnit.replace( QStringLiteral( "²" ), QStringLiteral( "2" ) ), QVariant::Double, QString(), 20, 8 ) );
outFields.append( QgsField( QStringLiteral( "sum" ), QVariant::Double, QString(), 20, 8 ) );
outFields.append( QgsField( QStringLiteral( "count" ), QVariant::LongLong, QString(), 20 ) );
outFields.append( QgsField( QStringLiteral( "min" ), QVariant::Double, QString(), 20, 8 ) );
Expand Down

0 comments on commit 057a5a3

Please sign in to comment.