Is this a bug? GCS NAD 83 in SQL Geography Fails....10.2.2: New feature?

3044
4
10-13-2014 10:13 AM
ThomasColson
MVP Frequent Contributor

I'm getting invalid LAT ranges when using ANY data in Arc SDE, Geography Data Type. Perhaps this is ignorance? To reproduce:

 

  1. Create, in Arc SDE 10.2.2, any SQL version, a polygon feature class with GCS NAD 83 as the coordinate system, Geography as the spatial/storage type.
  2. Load ESRI US States Shapefile into the Feature Class using the Arc Catalog "Load" tool;
  3. Observe how the States can be previewed in the Arc Catalog preview dialogue;
  4. In SSMS, query the table and select "Spatial Results". Note how SSMS shows the US States;
    1. If there was invalid geography, SSMS WOULD NOT show the states!
    2. states.PNG
  5. Add the same data to Arc Map;
    1. states2.PNG
  6. I've tried every sql geography validator there is, and this data passes.  There are no latitude values that fall between -90 and 90. Nor are there null latitude values in these data.
  7. Tried on numerous computers with SQL native client 10 or 11, same error;
  8. Same error on SQL 2008 R2 or 2012 SP2
  9. It seems like ArcMap is pivoting the lat/lon translation? How is this possible?

 

 

Either this is a new "feature" of 10.2.2 or I celebrated Columbus Day way to hard and I'm missing something obnoxiously obvious.

0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus

Just recovering from Canadian Thanksgiving...so my answer may be off...Is there the slightest chance that longitude and latitude are somehow being switched?

0 Kudos
ThomasColson
MVP Frequent Contributor

Using many, numerous SQL checks and validation tools, there are no issues in the data having LAT outside of -90/90 degrees>

SELECT a.OBJECTID, b.n,
  a
.SHAPE.STPointN(b.n).Lat AS Lattitude,
  a
.SHAPE.STPointN(b.n).Long AS Longitude
FROM dbo.STATES AS a, num_seq AS b
WHERE b.n <= a.SHAPE.STNumPoints()
ORDER BY a.SHAPE.STPointN(b.n).Lat, b.n;

Shows all LAT falling well inside -90/90 .

In addition, SSMS and Arc Catalog seem to handle this data nicely. I can use the data in numerous SQL expressions and no errors occur. Only when displayed in Arc Map does the error occur, which leads me to suspect that this is an issue with the Arc Map translation of the SQL Geography Type?

0 Kudos
AsrujitSengupta
Regular Contributor III

NIM096126 - SQL Server Geography data may not display correctl..

From the error observed, you seem to be hitting the above Bug, which has been fixed at 10.3.

0 Kudos
ThomasColson
MVP Frequent Contributor

Based on another post you answered, that was the first thing I checked, and is not the case. Recalculating the extent, or defining a custom extent, does not remove the error.

0 Kudos