Select to view content in your preferred language

SQL Server spatial queries and ArcSDE data types

3194
1
05-28-2013 11:33 AM
AndrewHayden1
Regular Contributor
I'm playing around with doing some basic sql server spatial queries on arcsde feature classes (in ssms) and have had some success working with polygons.  I'm having trouble when I start querying points.  I'd like to do a basic point in polygon query using STIntersects or STWithin.  When I select the point layer I want to use I get a message saying "cannot call methods on int" (STWithin).  When I look at the feature class in catalog, it tells me the shape field type is "geometry."  When I look at it in ssms, it shows the field type as "int."  I try to cast the field as geometry in my query but I get a message saying explicit conversion from int to sys.geometry is not allowed.  I'm curious if anyone has insight on the int vs geometry datatype between ssms and arcgis and how I can handle the int type for a point feature class?
0 Kudos
1 Reply
VinceAngelo
Esri Esteemed Contributor
SDEBINARY storage geometry layers are not visible to non-ArcSDE clients.  You'd need
to copy the layer to a new table using GEOMETRY or GEOGRAPHY storage (using a version
of ArcGIS compatible with the database, of course).

There's a ton of documentation to be had on this topic -- this link will put you in the right
general neighborhood.

- V
0 Kudos