1

I have a table in a SQL database that has been spatially enabled with a geography column.

In ArcGIS it is a line feature and can be viewed in ArcMap with no issues and even published as a map service with ArcGIS for Server.

However, neither the feature when it is in ArcMap or as a map service in a web app is able to be selected through the map. It can be selected through the attribute table.

I have adjusted and tested all selection settings in ArcMap. I have exported the data out as a shapefile an it works correctly. I have another table in the same SQL database that is a point feature and it works correctly.

Has anyone experienced this before or know of any esri bug related to this?

UPDATE 1:

I have rebuilt the table using geometry instead of geography - no change.

There is one feature that can be selected, it is the only feature west of the prime meridian.

UPDATE 2 (in response to comments):

1- Not sure about spatial indexes with SQL Spatial tables, please advise what i should be looking for?

2- I added the table to ArcMap from the database connection made in ArcCatalog, it calculated the extent on import, and maintained the correct spatial reference information as below:

GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]

The data also draws in the correct locations.

3- The table does have an objectID field. The table is not in a geodatabase, it is in SQL Server.

UPDATE 3:

Have found the below known issue. Not exactly what I am experiencing but similar. I adjusted the data to only be inside one hemisphere and it is still not working.

Bug: Spatial query fails...

UPDATE 4:

Have tested the same data in Blue Marble Global Mapper, and it works correctly. Looking like an esri bug.

  • 1
    This sounds like it may be a spatial index problem. Not 100% sure though. – Mintx Jan 5 '17 at 18:46
  • 1
    Please edit the question to specify how you loaded the table, the exact spatial reference parameters used, and details about all column definitions. – Vince Jan 5 '17 at 20:34
  • 1
    Is the table registered with the geodatabase? Does the table have an objectid field? I don't think selections can be executed without it. – Ben S Nadler Jan 5 '17 at 21:14
  • See updated question – Cjd111 Jan 6 '17 at 15:42
0

The issue was there were some stacked points in the data, in these cases x and y were the same between two points but the z values were different, hence drawing a vertical line. This is invalid geography in SQL Spatial.

The script was adjusted to select only distinct x and y values, effectively collapsing the stacked points into a single feature. This means that in a 3D world the line is incorrect, but on a 2D map it still appears correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.