-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QgsZonalStatistics.calculateStatistics() incomplete outputs #43245
Comments
Is the OR operator truly the intended way to list things? |
When the same function is called in a C++ script, it works fine. |
Possibly because they should be enum and python is not like c++ with stacking enums? |
Or because Because stacking enums seems properly handled but it looks like the issue comes from the conversion from QMap to Dict |
Fixes qgis#43245 SIP failed to convert the QMap<QgsZonalStatistics::Statistic, QVariant> so we give it an QMap<int, QVariant>.
Fixes #43245 SIP failed to convert the QMap<QgsZonalStatistics::Statistic, QVariant> so we give it an QMap<int, QVariant>.
Fixes qgis#43245 SIP failed to convert the QMap<QgsZonalStatistics::Statistic, QVariant> so we give it an QMap<int, QVariant>.
Fixes #43245 SIP failed to convert the QMap<QgsZonalStatistics::Statistic, QVariant> so we give it an QMap<int, QVariant>.
Fixes #43245 SIP failed to convert the QMap<QgsZonalStatistics::Statistic, QVariant> so we give it an QMap<int, QVariant>.
Fixes #43245 SIP failed to convert the QMap<QgsZonalStatistics::Statistic, QVariant> so we give it an QMap<int, QVariant>.
Describe the bug
Input:
Output:
The dictionary only contains Variance.
Since I specify
QgsZonalStatistics.Statistic.All
, output should contains all stats.If I pass a specific stat like
QgsZonalStatistics.Statistic.Mean
orQgsZonalStatistics.Statistic.Median
, the output is correct.If I build the argument to contain only 2 stats, output is wrong again and contains the only the last stat listed in All.
All = Count | Sum | Mean | Median | StDev | Max | Min | Range | Minority | Majority | Variety | Variance
Mix of Mean and Median will return Median, Median and Max return Max, ...
Examples:
Input:
Output:
Input:
Output:
In addition, the key corresponds to nothing. It could be the integer set here : https://qgis.org/api/qgszonalstatistics_8h_source.html#l00051
The text was updated successfully, but these errors were encountered: