Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

SDI - Shp to postgis example: Insert point to postgis fails

Hello all,
I've tryied the sample of SDI to insert shape features to postgis. All geometries run fine except for the Points. I got this error:
GRAVE: SQL Exception writing geometry columnERROR: new row for relation "_essai_sdi_plop2" violates check constraint "enforce_geotype_the_geom"
The table is created, but empty.
At the creation of the table, SDI wrote this:
ADD CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype("the_geom") = 'POINTM'::text OR "the_geom" IS NULL);
Seems that Postgis is not happy with the check constraint. Something strange is the name of this constrain: 'POINTM' why not 'POINT' ? Is it relevant or not? (I'm not sure to understand what happend behind this check constrain.)
I've tryied the same data with FME into postgis: the resulting geometry was multipoint. So I've tryied with SDI to convert with multipoint geometry:
INFO: ALTER TABLE "public"."_essai_sdi_plop2" ADD CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype("the_geom") = 'MULTIPOINTM'::text OR "the_geom" IS NULL);
This time all attributes are written, but geometries are null.
If someone has any id about what is going on with this sdi sample and point features, that for feedback!
Rémy
Labels (2)
1 Reply
_AnonymousUser
Specialist III
Specialist III
Author

Sorry Guys, there is a SDI branch in this forum and I did not see it... :-0
I've posted a tread there. Actually I found the solution for this issue. This is a geotools postgis plugin issue: after correcting it and rebuilding all worked fine.