user1873604
user1873604

Reputation: 175

SQL Server Geo MakeValid

An error thrown by SQL Server says that the MakeValid method may cause points to shift "slightly." I have been looking to see what, exactly, "Slightly" means here, but have not found anything.

Can someone please clarify what exactly this method considers "slight?"

Upvotes: 0

Views: 650

Answers (1)

Jon Bellamy
Jon Bellamy

Reputation: 3373

The .MakeValid() function simply tries to shift the geometry's coordinates by the minimum degree required to make the geometry valid as is defined by OGC standards.

I'm not sure that the actual term of "slight" is quantifiable, but you will notice that almost all coordinates shift to some degree, even if it's at the 6th, 7th, 8th or greater decimal place.

I try wherever possible to ensure that the geometry is valid and the function not required, because when used the inherent nature of floating-point precision means every X and Y value ends up carrying 13 decimal places which adds a lot of "weight" to the geometry in terms of storage and bandwidth. There are however plenty of sources that require it's use to conform.

It's not a definitive answer, but I'm not sure one is available, nor really needed.

Upvotes: 2

Related Questions