I have a PointZM shapefile and I would like to drop the Z value and just write out the PointM values to a new shapefile (I'm trying to test a shapefile reader so other formats are not an option).

If I specify the geometry in the export window and uncheck include z-dimension I get a simple POINT file with just X & Y. If I check that box I get a POINTZ file with X, Y & Z.

Is there some trick I can use or should I file an enhancement request?


You can use "Processing Toolbox > Vector Geometry > Drop M/Z Values" tool.

enter image description here


As workaround, you could use a virtual layer, specifying a query similar to the following:

SELECT id, MakePointM(x, y, attribute) AS geometry FROM PointZM_layer;

And then export the virtual layer as a shapefile.

Please note: I didn't have the chance to test this! :)

Reference: https://docs.qgis.org/2.14/en/docs/user_manual/working_with_vector/virtual_layers.html

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.