Opened 13 years ago

Last modified 10 years ago

#747 new bug

importing 3D geom into PostGIS via SPIT plugin

Reported by: pcavallini Owned by: nobody
Priority: minor: annoyance Milestone: Version 1.7.0
Component: C++ Plugins Version: Trunk
Keywords: PostGIS 3D shapefiles Cc: pcav
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no


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.

Attachments (1)

SPIT_3D-point.png (11.7 KB) - added by mwtoews 11 years ago.
Error message when attempting to load 3D Point Shapefile

Download all attachments as: .zip

Change History (9)

comment:1 Changed 13 years ago by pcavallini

Component: Build/InstallSPIT

comment:2 Changed 12 years ago by pcav

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.

Changed 11 years ago by mwtoews

Attachment: SPIT_3D-point.png added

Error message when attempting to load 3D Point Shapefile

comment:3 Changed 11 years ago by mwtoews

Type: enhancementbug

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.

comment:4 Changed 11 years ago by lutra

Cc: pcav added
Milestone: Version 1.0.3Version 1.2.0

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.

comment:5 Changed 11 years ago by pcav

Component: SPITPlugins

comment:6 Changed 11 years ago by pcav

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

comment:7 Changed 11 years ago by lutra

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

comment:8 Changed 10 years ago by pcav

Milestone: Version 1.5.0Version 1.6.0
Note: See TracTickets for help on using tickets.