Re: [Qgis-user] DB manager PostGIS import fails for strange reason

2022-07-26 Thread Mats Elfström via Qgis-user
Hi again!

Andrea Giudiceandrea responded :"*it seems to me the error message
says the contrary: you are trying to import MultiPolygon geometries in
a Polygon column geom type table.*"

Well I am not sure about that. It may be a semantic matter.
The PostGIS table is non-existent at the time of import, so the importer
can create any geometry type needed. Preferably polygon since the table in
the geopackage has geometrytype=Polygon.
And the error message "*PostGIS error while adding features: ERROR:
 Geometry type (MultiPolygon) does not match column type (Polygon)*" does
not really define origin and target.
Knowing that the geopackage table is polygon I assumed that for some reason
a PostGIS multipolygon table was created, causing the mismatch.

But let us assume that you are right - that the origin really is
multipolygon - how can I specify that a multipolygon table be created when
importing it to PostGIS?

Regards, Mats.E

-- 


*GisKraft*, Geodatakonsult

Mats Elfström, Marsvinsholms stationsväg 80, 271 93 Ystad, Sweden
tel: +46 70 595 39 35 / www.giskraft.se
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] DB manager PostGIS import fails for strange reason

2022-07-26 Thread Andrea Giudiceandrea via Qgis-user

*Mats Elfström*
/Tue Jul 26 02:31:29 PDT 2022/

*PostGIS error while adding features: ERROR: Geometry type (MultiPolygon)
does not match column type (Polygon)*

a MultiPolygon table should anyway be able to accept single polygons.


Hi Mats,
it seems to me the error message says the contrary: you are trying to 
import MultiPolygon geometries in a Polygon column geom type table.


Best regards.

Andrea Giudiceandrea___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] DB manager PostGIS import fails for strange reason

2022-07-26 Thread Mats Elfström via Qgis-user
Hi!

This regards QGIS version 3.26.0-Buenos Aires.

Attempting to import a gpkg poly layer to PostGIS I get this unexpected
error.

*Error 6*

*Feature write errors:*

*Creation error for features from #-9223372036854775808 to
#-9223372036854775808. Provider errors was: *

*PostGIS error while adding features: ERROR: Geometry type (MultiPolygon)
does not match column type (Polygon)*


*Only 0 of 179 features written.*


There is no option to set geometry type in the import settings, and a
MultiPolygon table should anyway be able to accept single polygons.

A corresponding gpkg point table from the same source can be imported
without problem.

I normally use FME to load PostGIS data, else I would probably have come
across this sooner.

-- 


*GisKraft*, Geodatakonsult

Mats Elfström, Marsvinsholms stationsväg 80, 271 93 Ystad, Sweden
tel: +46 70 595 39 35 / www.giskraft.se
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user