views:

193

answers:

1

How does this API works?

I am using some complex geography with ~2000 points (geometry of a river). While reducing with tolerance 2048, it works fine. But while reducing with tolerance factor 4096, it throws exception "24205: The specified input does not represent a valid geography instance because it exceeds a single hemisphere. Each geography instance must fit inside a single hemisphere. A common reason for this error is that a polygon has the wrong ring orientation."

Does this mean i have two geometry of different orientation (these points are located in single hemisphere only) in geography object and with tolerance 4096 it tries to merge these two geometries of different orientation and it fails? Is there anyway to avoid such scenarios?

+2  A: 

When SQL Server sees a geography instance it computes a bounding cap for it. If the cap angle exceeds 90 degrees then it throws exception 24205 "geography instance must fit inside a single hemisphere". This can be true even if none of the points cross the equator.

For an in depth answer see the Geography Hemisphere Limitation.

Anthony Faull
Thanks for the pointing to the blog. I have checked the cap angle. It is pretty small. So it may not be the problem while reducing the geography.
malay