How can I convert a 3d polyline shape to a 2d in QGis?

  • 1
    Did you try right click -> save as and then not to check the box "include z values" ?
    – Mazu_R
    Sep 15, 2017 at 14:08
  • Very good! how can i make this processe automatic? I mean if i have 100 shapes is there a command to repeat the action for all files instead doing this one by one?
    – alessandro
    Jan 18, 2019 at 18:26
  • To have your question answered, please post it as a new question, rather than as an answer to an old question.
    – csk
    Jan 18, 2019 at 18:40
  • If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review
    – Fran Raga
    Jan 18, 2019 at 18:52

1 Answer 1


Save a copy with Save vector layer as... Take care that the Include z-dimension option is unchecked.

enter image description here

  • Hi, but if you do that way you lose the z value, how can you keep the z value in the attributes table? Sep 15, 2017 at 14:20
  • If you convert shapefile from XYZ into XY then of coarse you will lose the Z. But you can save it as an attribute by using the field calculator and function called "z". Field calculator is documented docs.qgis.org/1.8/en/docs/user_manual/working_with_vector/….
    – user30184
    Sep 15, 2017 at 14:37
  • Hi, if a 3D shapefile is used, ie in its internal geometry is 3D when converting to 2D the Z value is lost, have you tried it? Attached example of curves in 3D geometry, thanks! dropbox.com/s/t8x0acw9mjo1exh/LINEAS3D_EJEMPLO.zip?dl=0 Sep 16, 2017 at 3:10
  • 3D means XYZ coordinates, 2D means XY. If you convert from 3D into 2D the only thing that happens is that Z-coordinates are removed. It is impossible to avoid that. But you can create a new attribute for Z into the attribute table and populate it with the Z values with field calculator before you drop Z from the geometries..
    – user30184
    Sep 16, 2017 at 5:36
  • You can learn how to use the field calculator from the answer to this gis.stackexchange.com/questions/202805/….
    – user30184
    Sep 16, 2017 at 9:58

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.