Bug report #747
importing 3D geom into PostGIS via SPIT plugin
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | - | ||
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 |
Description
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.
History
#1 Updated by Paolo Cavallini over 16 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 15 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 over 15 years ago
I made a quick test with the data available here
http://download.gfoss.it/Merano/
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.
#4 Updated by Paolo Cavallini almost 15 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 15 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 13 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.