Hi list members:
The subject says it : How to convert the geometry part from a geojson
string to a QgsGeometry
Some details:
How can I convert the geojson "geometry" part to a QgsGeometry ? i.e.
The part marked in *bold* ?
|{"type":"Feature",*"geometry"**:****{****"type"**:****"Point"**,****"coordinates"**:****[**125.6**,****10.1**]****}*,"properties":{"name":"Dinagat
Islands"}} |||
It's not the only "point" type, but all the geometry types (minus
"geometry collection"): linestring, polygon, multipoint, multilinestring
and multipolygon.
The json text is already converted to a python dict using json.dumps().
AFAIK, it's trivial to convert from QgsGeometry to geojson, but I can't
find an existing method to do the opposite.
--
Med venlig hilsen / Kind regards
Bo Victor Thomsen
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer