I need to run my shapefiles through a web mapping application which is incompatible with 3D shapefiles.

At present I run them through the FME Universal Translator in Mapinfo, which enables you to specify shapefile type.

I'm trying to find equivalent functionality in QGIS but haven't been able to so far.

Anyone know if this is possible?

  • Have you simply tried if it works? Open original file, then Save as ... to new file ... – underdark Jun 9 '14 at 9:16

If you are asking about 3D geometry in shapefiles, QGIS defaults to 2D shapefile exports. Currently, QGIS does not support 3D geometry with shapefiles.

| improve this answer | |

All the dataset and layer creation options which are supported by the corresponding GDAL driver can be used as "OGR creation options" in the Save as... window. For shapefile the available options are documented in http://www.gdal.org/drv_shapefile.html. If ogr2ogr program is used directly these options are given with -dsco and -lco parameters.

In your case, add SHPT=POINT to the OGR layer creation options box. Or ARC, POLYGON or MULTIPOINT for other geometrytypes as described on the driver page.

However, if you need to do conversions in batches you may want to use the GDAL utility ogr2ogr http://gdal.org/ogr2ogr.html directly. There is a handy shortcut "-dim" since GDAL 1.10. The usage is

ogr2ogr -f "ESRI Shapefile" -dim 2 output_2D.shp input_3D.shp

BTW the OGR Creation options seem to undocumented in the QGIS 2.2 manual.

| improve this answer | |

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.