[gdal-dev] Spatialite geometry format
Simon Lyngby Kokkendorff
silyko at gmail.com
Mon May 6 06:38:59 PDT 2013
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:
points2.GEOMETRY violates Geometry constraint [geom-type or SRID not
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):
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?
Simon Kokkendorff, Danish Geodata Agency
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev