0

I'm trying to update geometry column with pyspatialite but it returns error:

spatialite.dbapi2.IntegrityError: mypoints.the_geom violates Geometry constraint [geom-type or SRID not allowed]

My code is:

 cursor.execute(''' UPDATE mypoints SET  address = ?, the_geom = geomFromText('POINT(%f %f)', 2100)  WHERE PK_UID= ? ''' % (x_egsa, y_egsa),  (myaddress , myID))
  • This is likely caused by incomplete initialisation of the mypoints table, or declaring it with something other than a POINT geometry with SRID 2100. Can you post the results of a command line query (use spatialite or sqlite binary) of SELECT * FROM geometry_columns WHERE f_table_name="mypoints"; ? – BradHards Jun 11 '14 at 5:56
  • Here is the result:f_table_name:mypoints, f_geometry_column:the_geom, geometry_type:1,coord_dimension:2,srid:2100,spatial_index_enabled:0 – Leonidas Liakos Jun 12 '14 at 19:17

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.