Bug report #747
importing 3D geom into PostGIS via SPIT plugin
|Affected QGIS version:||Regression?:||No|
|Operating System:||All||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||wontfix|
|Crashes QGIS or corrupts data:||Copied to github as #:||10806|
Currently, >2D shapefiles are imported in PostGIS as 2D layers. This loss of info is not desirable; the SPIT plugin should be improved to handle appropriately 3D layers.
#2 Updated by Mike Taves about 12 years ago
Where is the Python plugin?
I've changed the type to a bug (from an enhancement) since a 3D Point Shapefile doesn't load at all, rather an error is thrown (see attachment), and nothing gets loaded (forcing me to investigate other methods to load data in...).
While adding the shapefile, the feature class is set to NULL. This is also visible in the error message (as 'NULL'), which also assumes dimension of 2.
To be honest, I don't really care to preserve the 3rd dimension, and I'd rather it be forced to two dimensions.
I'm using QGIS 1.0.1 via OSGeo4W.
#3 Updated by Giovanni Manghi almost 12 years ago
I made a quick test with the data available here
and this is the result:
SPIT fails to export this 3d shapes to postgis with the following error
Problem inserting features from file: /home/gio/Desktop/f05aa_UTM/f05aa_UTM.shp The database gave an error while executing this SQL: INSERT INTO "public"."f05aa_UTM" VALUES(0,' 51108','3','11','2003/09/06','10','1000',' 405353','21051',NULL,NULL,NULL,NULL,' 0','0',... (rest of SQL trimmed) The error was: ERROR: date/time field value out of range: "0000/00/00" HINT: Perhaps you need a different "datestyle" setting.
Postgis Manager is able to export to Postgis without errors just one one of these four shapfiles.
With the other three the error that is returned is
geometry contains non-closed rings
Beside this error, two layers do appear in postgis (but with missing features).
All the three layers that are imported totally or partially in Postgis can be visualized by qgis.