1

I have CAD-data which I transformed to shapefiles. Currently after the transformation the objects still have a Z value which is useless to me.

My question is: How do I convert a MultiLineStringZ-object to a MultiLineString-object?

1

There is a ST_Force2d function in PostGIS which does the job. A new table should be created with 2D geometry and use an insert statement with select to populate the new table:

insert into new_table (geom, col1, col2, col3) 
select ST_Force2D(geom), col1, col2, col2 from old_table;

You should substitute your real column names into col1, col2, ... You can query the table structure with in psql

\d old_table

or you can use pgadmin with GUI.

  • Could you accept my answer clicking on the up arrow beside my answer? – Zoltan Dec 28 '18 at 10:48
1

Run the drop z values algorithm from the QGIS processing toolbox

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.