Hi,
thanks for your answer again (again I was unclear in my question, sorry
for that - I am using "ST_GeomFromText('LINESTRING(APPROPRIATE_VALUES)',
APPROPRIATE_SRID)" ).
I think I found the problem:
My parametrized command text looks like:
"INSERT INTO RoadSegments (Id, Geometry) VALUES (@IdParam, @GeometryParam)"
An example for the command parameters would then be:
IdParam - "1"
GeometryParam - "ST_GeomFromText('LINESTRING(APPROPRIATE_VALUES)',
APPROPRIATE_SRID)"
Where it should be:
"INSERT INTO RoadSegments (Id, Geometry) VALUES (@IdParam,
ST_GeomFromText(@GeometryWKTParam, APPROPRIATE_SRID))"
and the command parameter values:
IdParam - "1"
GeometryWKTParam - "'LINESTRING(APPROPRIATE_VALUES)'"
I will try this and if it works I will post the answer on the
[email protected] mailing list.
Thanks for your time and helping me, even if this is not the correct
place to ask :)
bye Markus
Am 29.01.2013 15:21, schrieb [email protected]:
Hi Mark,
Currently I am converting my C# polygons to a string of the form
"LINESTRING(x1 y1, ..., xN yN)" which would be the WKT (Well-Known
Text) format.
If I understand your answer correct I could simply convert my C#
polygons to the WKB (Well-Known Binary) format and use BLOB as the
DbType in my SQLiteParameter.
Is that correct?
no, this is not correct.
be very careful: both WKT and WKB are intended as standardized notations
representing Geometries, but they are not the same of the "binary
internal
BLOB format" supported by SpatiaLite.
anyway you can use the following standard Spatial SQL functions in order
to correctly serialize / deserialize the internal Geometries format:
to/from WKT notation: ST_AsText() / ST_GeomFromText()
to/from WKB notation: ST_AsBinary() / ST_GeomFromWKB()
bye Sandro
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users