locked
Spatial operations in SQL Server are done with maths with low precision. Should it be changed? RRS feed

  • General discussion

  • SQL Server 2008 stores the vertex coordinates using a double precision IEEE format wih 8 bytes (64 bits). That’s correct and similar as other spatial databases vendors do (Oracle, ESRI, etc). However, the operations are done using a grid with 3.4 bytes integer precision (27 bits). This small resolution grid is the responsible for the lack of precision in all the spatial operations. And as a consecuence, some vertexes of the geometries involved in the spatial operation are moved, causing small distortions and troubles with the geometries returned: some narrow geometries collapses and dissapear, some vertexes of other geometries are moved causing small overlaps and holes with their adjacents geometries, returned geometries has small slivers, etc.
    We want to use SQL Server 2008 in order to maintain data that currently has a high topological quality. But, with the current lack of precision, it's impossible to guarantee this quality.
    [ We have tested ESRI databases/software and they don't have this precision problem. ]
    Microsoft knows this problem/limitation, but says that the solution will be implemented only if there are more customers affected by this precision problem.
    Are you affected? Do you want this problem to be corrected? If you consider that this should be corrected, please visit:

    https://connect.microsoft.com/SQLServer/feedback/details/580254/spatial-operations-are-done-with-a-low-precision-causing-troubles-in-the-returned-data#details

    and vote for it. In that link you have some additional steps to reproduce the problem.

    What do you think?

    Wednesday, July 28, 2010 1:06 PM

All replies