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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

shape to postgis example -> only point features fail.

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 (1)
  • Other

2 Replies
_AnonymousUser
Specialist III
Specialist III
Author

Dear Poulet1212,
this is an issue of the current PostgisDataStore.java of Geotools, an issue has been posted thatfore.
Hope this helps.
regards
Anonymous
Not applicable

Try to use a tPostgresOutput component instead or set geometry type to geometry instead of point.
HTH.
Francois