We are using a SQL Server Spatial database with the following table setup:
I am using a SQL Server stored procedure to perform the following test:
When tested the using the following it correctly returns
.Parameters.Append .CreateParameter("@poly ", 200, 1, 50, "POLYGON((1 1, 3 3, 3 1, 1 1))") .Parameters.Append .CreateParameter("@srid ", 3, 1, 10, 0)
When I run the live data (held in the recordset
rs) it always returns false even though I suspect about half the polygons should be
.Parameters.Append .CreateParameter("@poly ", 200, 1, 1000000000, rs("ogr_geometry")) .Parameters.Append .CreateParameter("@srid ", 3, 1, 10, 27700)
Am I doing anything that is obviously wrong or could it be the case that although some of the geometry works in our system none of it is strictly valid?
I have prepared a ZIP file with an example polygon that works and one that does not. Both are being flagged by SQL Server as invalid.