I am developing an android application that uses the database spatialite, I use this project to integrate the database on android https://code.google.com/p/spatialite-android/ It works normally, except when I use the clauses' UPDATE 'or' INSERT' it there's the trigger that prevents the request to be executed, i get the following message:'geometry violates Geometry constraint [geom-type or SRID not allowed]. whatsoever geometries that I want to update or just attribute data, but when I execute the same clause in spatialite_gui for example, it works normaly. I tried to delete the trigger, the problem is solved, but after it is impossible to execute spatial queries, the table is corrupted. I can't understand or locate the problem,to try to solve it

Why the trigger prevents 'insert' and 'update' on android and not on saptialite_gui?

  • Welcome to GIS SE! Would you be able to edit your Question, using the button beneath it, to revise it with a single question mark somewhere to indicate precisely what you area asking, please? – PolyGeo Feb 24 '14 at 22:30
  • @Chakib: Can you do an Insert when there is no trigger? – Devdatta Tengshe Feb 25 '14 at 2:35
  • yes i can do an INSERT when there is no trigger – Chakib Feb 25 '14 at 9:14
  • @Chakib: Can you share the code on how you insert the data? It might help show us why the Geometry constrain is violated. I'm also interested in this for a selfish reason: I've never been able to insert data, and I even logged a Bug regarding this: code.google.com/p/spatialite-android/issues/detail?id=36 – Devdatta Tengshe Feb 25 '14 at 9:18
  • eg of statment: insert into table(Geometry) values ( GeomFromText('POINT (2.8 33.8)', 4326)); it works normally on saptialite_gui, and not on android-spatialite; whene i drop trigger it works on spatialite-android, but the table is corrupted. – Chakib Feb 25 '14 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.