[QGIS-Developer] WKT from QgsGeometry incompatible with OGR
Ivan Barsukov
ivan.barsukow at gmail.com
Thu Jul 4 06:18:59 PDT 2024
Hi everyone!
Could you please tell me why the QgsGeometry::asWkt method returns the
names of geometry types with the Z coordinate without a space (PointZ
instead of Point Z, etc.)? This value is not compatible with ogr.
A minimal example is below. Executing it will return an exception:
"RuntimeError: OGR Error: Corrupt data"
from osgeo import ogr
qgis_geometyry = QgsGeometry().fromWkt("POINT Z (0 0 0)")
wkt = qgis_geometyry.asWkt() # 'PointZ (0 0 0)'
ogr.CreateGeometryFromWkt(wkt)
More information about the QGIS-Developer
mailing list