[Qgis-developer] Geometry type does not match column type

Salvatore Larosa lrssvtml at gmail.com
Sat Mar 24 10:37:40 EDT 2012


Hi,
I'm working with PostGIS tables and noticed some problems, but I can not
tell if the problem is in QGIS or PostGIS!
For this reason I am writing to both the mailing list.

First issue:

http://hub.qgis.org/issues/5109

Second:

If I use the SPIT plugin to import polygon features in PostGIS I get
this:

##########CODE###############################################################
Problema nell'inserimento di elementi dal file:
/home/sam/test_topology/prov.shp

Il database ha restituito un errore durante l'esecuzione di questa
istruzione SQL:
INSERT INTO
"public"."prov"("provincia","cod_pro","sigla","cod_reg","sede","anno_volo","liv_utente","geom") VALUES ('Catanzaro','079','CZ','18',NULL,'.. (omesso l'SQL restante)
L´errore era:
ERROR:  Geometry type (Polygon) does not match column type
(MultiPolygon)
##########END###############################################################

while, if I import line features I get:

##########CODE###############################################################
Problema nell'inserimento di elementi dal file:
/home/sam/test_topology/linestring/river.shp

Il database ha restituito un errore durante l'esecuzione di questa
istruzione SQL:
INSERT INTO
"public"."river"("LUNG_(M)","ORD_HORTON","COD_ASTA","COD_BACINO","Q_MAX_(M)","Q_MIN_(M)","PEND_(%)","NOME_ASTA","COMUNE","geom") VALUES ('.. (omesso l'SQL restante)
L´errore era:
ERROR:  Geometry type (LineString) does not match column type
(MultiLineString)
##########END###############################################################

my configuration is:

##########CODE###############################################################
"POSTGIS="2.0.0beta5SVN r9542" GEOS="3.3.2-CAPI-1.7.2" PROJ="Rel. 4.7.1,
23 September 2009" GDAL="GDAL 1.9.0, released 2011/12/29" LIBXML="2.7.8"
TOPOLOGY RASTER"

QGIS-Version 1.9.90-Alpha
QGIS-Codeversion 51ece3c
##########END###############################################################

Can anyone confirm?

All the best!

-SL





More information about the Qgis-developer mailing list