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)

2 Answers 2


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


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"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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