[fdo-internals] SQL Spatial Server enhancement

Romica Dascalescu Romica.Dascalescu at autodesk.com
Wed Apr 27 10:40:42 EDT 2011


Hi,

Recently we've done some improvement to the SQL Spatial Server in order to be able to support Z & M coordinates. Please see ticket http://trac.osgeo.org/fdo/ticket/763
In order to be able to do so we had to move away from WKB format, that offers only 2D support.
Based on Microsoft documents we could move to the Microsoft geometry format (http://msdn.microsoft.com/en-us/library/ee320529.aspx) allowing us to have full support for Z and M, and arcs in the future release.

Moving to the new format we hit a problem; since we used ODBC and SQL_LONGVARBINARY to bind (WKB) geometries we got an error from Microsoft default driver - Operand type clash: image is incompatible with geometry.
This might be related to the fact Microsoft plans to remove image data types in the future releases. "ntext, text, and image data types will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max)<http://msdn.microsoft.com/en-us/library/ms186939.aspx>, varchar(max)<http://msdn.microsoft.com/en-us/library/ms176089.aspx>, and varbinary(max)<http://msdn.microsoft.com/en-us/library/ms188362.aspx> instead."
We could solve this by using SQL_VARBINARY binding, however this did not fixed everything. Using SQL_VARBINARY we can bind geometries with size less than 8000 in Microsoft default driver. In case we had a bigger geometry an error "Invalid precision value" showed up.

We could get rid of all problems by using the new SQL Server Native Client 10.0. This allowed us to bind big geometries using SQL_VARBINARY.
Since this enhancement generated a small requirement (SQL Server Native Client 10.0 must be installed) in order to be able to use the provider, please ensure you have installed the "SQL Server Native Client 10.0" before trying to use the provider.
Please let me know if you have any questions related to this enhancement.

Thanks,
Romy.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-internals/attachments/20110427/a5b8402b/attachment.html


More information about the fdo-internals mailing list