Skip to content

Commit

Permalink
[processing] Raster layer unique values output should use longlong
Browse files Browse the repository at this point in the history
for pixel count field, otherwise values can be too large for plain
integer fields when outputting to eg geopackage and ran on a very
large raster
  • Loading branch information
nyalldawson committed Nov 23, 2022
1 parent bfde785 commit f0de98e
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -113,7 +113,7 @@ QVariantMap QgsRasterLayerUniqueValuesReportAlgorithm::processAlgorithm( const Q
{
QgsFields outFields;
outFields.append( QgsField( QStringLiteral( "value" ), QVariant::Double, QString(), 20, 8 ) );
outFields.append( QgsField( QStringLiteral( "count" ), QVariant::Int, QString(), 20 ) );
outFields.append( QgsField( QStringLiteral( "count" ), QVariant::LongLong, QString(), 20 ) );
outFields.append( QgsField( areaUnit.replace( QStringLiteral( "²" ), QStringLiteral( "2" ) ), QVariant::Double, QString(), 20, 8 ) );
sink.reset( parameterAsSink( parameters, QStringLiteral( "OUTPUT_TABLE" ), context, tableDest, outFields, QgsWkbTypes::NoGeometry, QgsCoordinateReferenceSystem() ) );
if ( !sink )
Expand Down

0 comments on commit f0de98e

Please sign in to comment.