2

I have a bunch of kmz files which I need to merge into one so I can convert it into one polygon shapefile using QGIS.

The problem is that I have some kmz that are polygon, and some that are polygonz and QGIS wont allow the merging of different types of geometry.

So, how can I convert all those polygonz at once (batch) into polygon? (without the z attribute)?

(I know I can save one by one as shapefile than change the geometry type, but I wonder if there is a faster way since I have many layers)

1

On windows you could run an ogr2ogr script (after extracting the kmz to kml first, this can be done with any unzip tool) to convert all the files to ShapeFile:

for /R %f in (*.kml) do ogr2ogr "%~dpnf.shp" -nlt PROMOTE_TO_MULTI "%f"

3

For instance, you could use the SAGA "Flatten polygon layer" tool from Processing executing it as a batch process.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.