Hi List, I am programming an application which can transform ogr-datasources (using our own transformation library). In that process I use ogr (version 1.10) via the c-api to read and write datasources - usually it works like a charm. However, when I try to write an output spatialite datasource, I run into this error:
sqlite3_step() failed: points2.GEOMETRY violates Geometry constraint [geom-type or SRID not allowed] (19) I am not sure whether it's an issue with the SRID or the geom-type / format. I also see on the ogr-drivers page, that spatialite use a speciel (wkb like?) format for the geometry column. What I usually do is to clone an input feature, clone the geometry: hGeometry = OGR_G_Clone(OGR_F_GetGeometryRef(hFeature_out)); perform some transformations and set the geometry (again): OGR_F_SetGeometryDirectly(hFeature_out,hGeometry); While this works for (most) input and output datasources, it produces the error above for spatialite output. Perhaps because the internal geometry reperesentation is wrong, or there is some other more strict check of output srs - e.g. should I use OGR_G_AssignSpatialReference to assign the output spatial reference to the geometry? Is there something obvious that I am missing here? Best Regards, Simon Kokkendorff, Danish Geodata Agency
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
