[QGIS-Developer] QGIS unstable on debian testing

Andrea Giudiceandrea andreaerdna at libero.it
Tue Apr 14 11:40:14 PDT 2020


Richard Duivenvoorde wrote
> QgsGeometry.fromWkt('Polygon ((0 0, 1 1, 1 0, 0
> 0))').intersection(QgsGeometry.fromWkt('Point (42 0)'))
> 
> shows me:
> QgsGeometry: PointZ (0 0 nan)
> 
> which also is a little strange...?

I've also recently encountered this strange behavior and I was just trying
to figure out if it's normal...

On Windows 7 64 bit,

using QGIS 3.10.1 (ef24c526da), QGIS 3.10.3 (0e1f846438) and QGIS 3.12.0
(cd141490ec), all with GEOS 3.8.0-CAPI-1.13.1:

QgsGeometry.fromWkt('Polygon ((0 0, 1 1, 1 0, 0
0))').intersects(QgsGeometry.fromWkt('Point (42 0)'))
returns False
QgsGeometry.fromWkt('Polygon ((0 0, 1 1, 1 0, 0
0))').intersection(QgsGeometry.fromWkt('Point (42 0)'))
returns <QgsGeometry: Point (0 0)>
print(wkt.loads('Polygon ((0 0, 1 1, 1 0, 0
0))').intersection(wkt.loads('Point (42 0)')))
returns POINT EMPTY

using QGIS 3.4.9 (b64ef50d0e) with GEOS 3.7.0-CAPI-1.11.0 673b9939:

QgsGeometry.fromWkt('Polygon ((0 0, 1 1, 1 0, 0
0))').intersects(QgsGeometry.fromWkt('Point (42 0)'))
returns False
QgsGeometry.fromWkt('Polygon ((0 0, 1 1, 1 0, 0
0))').intersection(QgsGeometry.fromWkt('Point (42 0)'))
returns <QgsGeometry: GeometryCollection ()>
print(wkt.loads('Polygon ((0 0, 1 1, 1 0, 0
0))').intersection(wkt.loads('Point (42 0)')))
returns GEOMETRYCOLLECTION EMPTY

using QGIS 2.18.23 (33e81905f4) with GEOS 3.6.1-CAPI-1.10.1 r0:
QgsGeometry.fromWkt('Polygon ((0 0, 1 1, 1 0, 0
0))').intersects(QgsGeometry.fromWkt('Point (42 0)'))
returns False
QgsGeometry.fromWkt('Polygon ((0 0, 1 1, 1 0, 0
0))').intersection(QgsGeometry.fromWkt('Point (42 0)')).exportToWkt()
returns u'GeometryCollection ()'
print(wkt.loads('Polygon ((0 0, 1 1, 1 0, 0
0))').intersection(wkt.loads('Point (42 0)')))
returns GEOMETRYCOLLECTION EMPTY





--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html


More information about the QGIS-Developer mailing list