Skip to main content
Mention that -dim works for other formats as well, and the special case with Oracle.
Source Link
user30184
  • 69.2k
  • 4
  • 71
  • 125

Write your data into a new shapefile with ogr2ogr and force geometry type into 2D with the -dim switch.

ogr2ogr -f "ESRI Shapefile" output_2d.shp input_zm.shp -dim 2 

The -dim setting is not limited to shapefiles but works in the same way for most vector formats. One exception I know is Oracle Spatial that does not honour the ogr2ogr switch but you must use the layer specific -lco DIM=2instead.

http://gdal.org/ogr2ogr.html

http://www.gdal.org/drv_oci.html

Write your data into a new shapefile with ogr2ogr and force geometry type into 2D with the -dim switch.

ogr2ogr -f "ESRI Shapefile" output_2d.shp input_zm.shp -dim 2 

http://gdal.org/ogr2ogr.html

Write your data into a new shapefile with ogr2ogr and force geometry type into 2D with the -dim switch.

ogr2ogr -f "ESRI Shapefile" output_2d.shp input_zm.shp -dim 2 

The -dim setting is not limited to shapefiles but works in the same way for most vector formats. One exception I know is Oracle Spatial that does not honour the ogr2ogr switch but you must use the layer specific -lco DIM=2instead.

http://gdal.org/ogr2ogr.html

http://www.gdal.org/drv_oci.html

Source Link
user30184
  • 69.2k
  • 4
  • 71
  • 125

Write your data into a new shapefile with ogr2ogr and force geometry type into 2D with the -dim switch.

ogr2ogr -f "ESRI Shapefile" output_2d.shp input_zm.shp -dim 2 

http://gdal.org/ogr2ogr.html