Geographic Information Systems Asked by jarekj71 on April 18, 2021
I noticed that with at least QGIS 3.14 (maybe earlier too) all objects are exported to shapefile as multi-geometry ie. points are exported as multipoints, lines as multiLines, etc, even if objects are internally stored as single-part geometry (after running multipart to single part). I simply noticed that when some of my GDAL-based scripts stopped working with new data processed with this version of QGIS.
I consider it a bug. But I’m afraid it is a feature with some narrow-targeted explanations.
@Jarekj1 yes, I also noticed it trying to change a plugin from QGIS2 to 3, in QGIS3.4. I could notice that in QGIS2 it accepted simple geometries, but in 3 all of them are "apparently" generated as multipart.
Just in case, I put a conditional in my code if feature.geometry().isMultipart():
to handle the case that a simple geometry arrives, but it has not happened yet.
If you are writing code I advise you to consider that conditional. At least, until we find such a specification in the API or a CORE developer manifests it
If you want to handle multiparts with python in QGIS, just make the queries and we will guide you.
Answered by Luis Perez on April 18, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP