<div dir="ltr">Hi,<br><div><br>There is a problem when trying to export 3D layers from PostGIS to shapefile, using "Save as..." of QGIS 2.12 and master. Tested with Pointz, PolygonZ, MultiPolygonZ, ... Always appears the following error:<br><br>Export to vector file failed.<br>Error: Feature write errors:<br>Feature geometry not imported (OGR error: )<br>Only 0 of 1 features written.<br><br>Despite the error, it creates a shapefile, but only the structure, without data, and a 2D shapefile.<br><br>The same operation (Save as...) with QGIS 2.8.4, works fine, but also converts the shapefile to 2D.<br><br>Making the export with ogr2ogr, works well and keeps the shapefile in 3D.<br><br></div><div>Save as... from a 3d shapefile to another shapefile, also works well on all QGIS versions, and keeps 3D geometry.<br><br></div><div><br>Another problem occurs when trying to edit those same 3D PostGIS layers. <br><br>With the layers in shapefile, everything works fine. Importing 3D shapes for PostGIS, works well. Edit these layers/geometries in Postgis, including moving geometries or vertex, editing attributes or the Z coordinate of the vertex (with the Node Tool) also works well.<br><br>But when trying to add a new feature, it can no longer write to the PostGIS, and this error show up:<br><br>Could not commit changes to layer point<br>Errors: ERROR: 1 feature(s) not added.<br>  Provider errors:<br>      PostGIS error while adding features: ERROR:  Column has Z dimension but geometry does not<br>      <br><br>Are these bugs? Could they be related? I am sending a sample 3D shapefile for tests -> <br>$ ogrinfo -al 3d_point.shp<br>INFO: Open of `3d_point.shp'<br>      using driver `ESRI Shapefile' successful.<br>Layer name: 3d_point<br>Geometry: 3D Point<br>Feature Count: 1<br>Extent: (36784.489088, 122737.827707) - (36784.489088, 122737.827707)<br>Layer SRS WKT:<br>PROJCS["ETRS89_Portugal_TM06",<br>    GEOGCS["GCS_ETRS_1989",<br>        DATUM["European_Terrestrial_Reference_System_1989",<br>            SPHEROID["GRS_1980",6378137,298.257222101]],<br>        PRIMEM["Greenwich",0],<br>        UNIT["Degree",0.017453292519943295]],<br>    PROJECTION["Transverse_Mercator"],<br>    PARAMETER["latitude_of_origin",39.66825833333333],<br>    PARAMETER["central_meridian",-8.133108333333334],<br>    PARAMETER["scale_factor",1],<br>    PARAMETER["false_easting",0],<br>    PARAMETER["false_northing",0],<br>    UNIT["Meter",1]]<br>FID: Real (11.0)<br>OGRFeature(3d_point):0<br>  FID (Real) = 0<br>  POINT (36784.489087541471235 122737.827706980169751 300)<br><br><br></div><div>I've tested both on Windows and Linux.<br></div><div><br><br></div><div>Best regards,<br></div><div>Pedro Venâncio<br><br><br></div></div>