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
QGIS and OS versions 81911c1 on Debian testing (geos 3.8.1) , 3.10.2 on windows (geos 3.8.0)
Additional context
the empty geometry collection also gives the following strange result: Nanananananananan, Batman!
>>> QgsGeometry.fromWkt('GeometryCollection EMPTY').minimalEnclosingCircle()
(<QgsGeometry: Polygon ((nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan, nan nan))>, <QgsPointXY: POINT EMPTY>, 0.0)
The text was updated successfully, but these errors were encountered:
uclaros
added
the
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
label
May 2, 2020
For the first one it seems to be an issue with the use of an invalid GEOSNearestPoints_r result. Should be fixed by avoiding calling it when the geometry is empty.
Second one comes from the fact minimalEnclosingCircle has an hidden default parameters for the size of the number of segments of the enclosing circle (36). What you see is a default invalid result for the minimalEnclosingCircle algorithm : an invalid 36 segments polygon . In this case I think it is preferable to also return a null geometry if the geometry on which we call the algorithm is empty.
…empty to avoid creating an invalid GEOSNearestPoints_r.
* In QgsGeometry minimalEnclosingCircle method : return a default QgsGeometry instead of a default 36 segments polygon with NaN value if the geometry is empty.
fixqgis#36142
Describe the bug
QGIS crashes when calling
QgsGeometry::nearestPoint()
on an empty collectionQgsGeometry
How to Reproduce
On a python console run the following:
QGIS and OS versions
81911c1 on Debian testing (geos 3.8.1) , 3.10.2 on windows (geos 3.8.0)
Additional context
the empty geometry collection also gives the following strange result:
Nanananananananan, Batman!
The text was updated successfully, but these errors were encountered: