You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
APIAPI improvement only, no visible user interface changesBugEither a bug report, or a bug fix. Let's hope for the latter!MeshRelated to general mesh layer handling (not specific data formats)
I'm running a supported QGIS version according to the roadmap.
New profile
I tried with a new QGIS profile
Additional context
No response
The text was updated successfully, but these errors were encountered:
rduivenvoorde
added
API
API improvement only, no visible user interface changes
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Mesh
Related to general mesh layer handling (not specific data formats)
labels
Nov 28, 2022
APIAPI improvement only, no visible user interface changesBugEither a bug report, or a bug fix. Let's hope for the latter!MeshRelated to general mesh layer handling (not specific data formats)
What is the bug or the crash?
Playing with PyQGIS and Mesh layers, I hit the following:
According to:
https://qgis.org/pyqgis/master/core/QgsMeshRendererScalarSettings.html#qgis.core.QgsMeshRendererScalarSettings.DataResamplingMethod
You can set the DataResamplingMethod of QgsMeshRendererScalarSettings to None (0) or NeighbourAverage (1)
But while in a python console or pyqgis you can use
QgsMeshRendererScalarSettings.NeighbourAverage
(shows 1)Both a script or the python console will give you an error if you try:
QgsMeshRendererScalarSettings.None
Probably because None is a reserved keyword in Python?
Note that the following (for a Mesh layer which has None as resampling) works (it just returns 0)
So as a work around you can off course use
.setDataResamplingMethod(0)
But I think it would be better to not use
None
as name of a constant?Or am I missing a possibility?
https://github.com/qgis/QGIS/blob/master/src/core/mesh/qgsmeshrenderersettings.h#L111
Would that be an api break to change this? Or is there some other way (maybe in the sip steps?)
@PeterPetrik what do you think?
Steps to reproduce the issue
See above
Versions
master
Supported QGIS version
New profile
Additional context
No response
The text was updated successfully, but these errors were encountered: