Trying to merge 2 vector layers; one is of type "LineStingZ", the other is just "LineString". When I run the merge algorithm I get the message saying "Error executing algorithm Merge vector layers All layers must have same geometry type!"; but when I try to do a save-as on the LineString layer and check the 'Include z-dimension' I get a new "LineStringZM" type and they still don't match. Is there another way to specify the layer type?


You should be able to use the MMQGIS plugin to convert your LineStringZ layer to LineString. From the MMQGIS menu go to Modify > Convert Geometry Type. Select your LineStringZ layer as the source layer and new geometry type as lines.

EDIT: As pointed out by @Alexandre Neto, in QGIS 2.18, Convert geometry type is available from the processing toolbox under QGIS geoalgorithms > Vector geometry tools.

  • 2
    In QGIS 2.18 you don't need MMQGIS plugin for that. the Convert Geometry type is available on the Processing toolbox. Nov 29 '17 at 2:31
  • You're right @Alexandre Neto- I hadn't noticed that. Under QGIS geoalgorithms > Vector geometry tools.
    – Ben W
    Nov 29 '17 at 3:07
  • Thanks - that works. Also works just by doing a 'save as' and changing the geometry type from Automatic to LineSting and unchecking the 'Include Z-dimension'. So to solve the issue in the end, I had to change the LineStingZ layer to LineString, I couldn't do it the other way around without getting the ZM LineSting type. Thanks for the help!
    – CEL-ma
    Nov 29 '17 at 13:23

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.