<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 4 July 2024, 11:19 pm Ivan Barsukov via QGIS-Developer, <<a href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everyone!<br>
<br>
Could you please tell me why the QgsGeometry::asWkt method returns the <br>
names of geometry types with the Z coordinate without a space (PointZ <br>
instead of Point Z, etc.)? This value is not compatible with ogr.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Both formats are compliant with the WKT specifications. This should rather be filed as a feature request for GDAL to support the forms without a space.</div><div dir="auto"><br></div><div dir="auto">Nyall</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
A minimal example is below. Executing it will return an exception: <br>
"RuntimeError: OGR Error: Corrupt data"<br>
<br>
from osgeo import ogr<br>
<br>
qgis_geometyry = QgsGeometry().fromWkt("POINT Z (0 0 0)")<br>
wkt = qgis_geometyry.asWkt() # 'PointZ (0 0 0)'<br>
ogr.CreateGeometryFromWkt(wkt)<br>
<br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank" rel="noreferrer">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div></div></div>