I'm more of an ArcGIS user than a SQL Server user but I have polygon data in a 'geography' type in SQL 2008 R2. For a couple of these poly layers, I get this persistent drawing error in ArcMap:
One or more layers failed to draw:
Cultural Resource Site Polygon: Underlying DBMS error
[[Microsoft][SQL Server Native Client 10.0][SQL Server]A .NET
Framework error occurred during execution of user-defined routine or
aggregate "geography": System.FormatException: 24201: Latitude values
must be between -90 and 90 degrees. System.FormatException: at
Microsoft.SqlServer.Types.GeographyValidator.ValidatePoint(Double x,
Double y, Nullable1 z, Nullable
1 m) at
Microsoft.SqlServer.Types.Validator.BeginFigure(Double x, Double y,
Nullable1 z, Nullable
1 m) at Microsoft.SqlServer.Typ]
[db.layer]
I thought at first this might be related to other posts I've seen on incorrect ring orientation in polygons but those errors tend to say that the data exceeds a hemisphere. This error seems to suggest that I have vertices inside some of my polys that are perhaps backwards.
Unsure how to find them in SQL (any help would be great!), I turned to ArcMap and used the Feature Vertices to Points tool to create a set of points at every vertex of my polys. I then calculated X and Y on those points. I can't find any instance where my Y exceeds either 90 or -90.
Unsure at this point…
Best Answer
There's been a bug filed in Esri about this error message as:
Bug: Spatial query fails when features are stored in SQL Server Geography storage type and the filter shape is larger than one hemisphere