Bug report #747

importing 3D geom into PostGIS via SPIT plugin

Added by pcavallini - about 16 years ago. Updated almost 12 years ago.

Category:C++ Plugins
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.

SPIT_3D-point.png - Error message when attempting to load 3D Point Shapefile (11.7 KB) Mike Taves, 2009-04-20 05:15 PM


#1 Updated by Paolo Cavallini about 15 years ago

I suggest dropping the plugin, since analogous and presumably more robust functionality is now available through a python plugin. It will be easier and fater to improve the secon one.

#2 Updated by Mike Taves over 14 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 about 14 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:
The database gave an error while executing this SQL:
INSERT INTO "public"."f05aa_UTM" VALUES(0,'
405353','21051',NULL,NULL,NULL,NULL,'          0','0',... (rest of SQL
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.

#4 Updated by Paolo Cavallini almost 14 years ago

I suggest closing this bug, and deprecating SPIT in favour of PostGIS Manager, once it will be included in standard QGIS packages

#5 Updated by Giovanni Manghi almost 14 years ago

before discontinuing SPIT I believe it would be necessary to implement in Postgis Manager a feature to allow multiple shapefile export to Postgis. Actually you may export to postgis just one shape at the same time. See #2001

#6 Updated by Paolo Cavallini almost 12 years ago

  • Pull Request or Patch supplied set to No
  • Status changed from Open to Closed
  • Assignee deleted (nobody -)
  • Resolution set to wontfix

IMHO SPIT will not be maintained, as DB Manager will enter into Master. No work should go into fixing this.

Also available in: Atom PDF