I created a test implementation of the ESRI Geometry to WKT recipe provided by @SagebrushGIS. It seems to work great, but I'm wondering if the SRID value expected by Microsoft.SqlServer.Types (specifically SqlGeometry.STGeomFromWKB) corresponds directly to feature.Shape.SpatialReference.FactoryCode?

I stumbled across this thread in the ArcGIS forums where user zroberthu says (not so difinitively) that the two are equal. And when I debug this line (my feature class is projected to NAD_1983_StatePlane_Missouri_Central_FIPS_2402_Feet):

int srid = feature.Shape.SpatialReference.FactoryCode;
// I get srid = 102697

Next, if I go to SpatialReference.org and search by my ESRI projection name, it takes me here, and I see the value 102697 most everywhere I expect to find it. However, if I select the PostGIS insert statement, it shows srid is 9102697, and then an "auth_srid" field corresponds to 102697.

So my questions are these:

1) At the end of the day, does the SRID even matter if I'm not performing spatial operations on two different getdatasets? (Presently, I just want a simple way to expose a feature's WKT in the ArcMap UI.)

2) Can I difinitively say an ArcGIS feature's Shape.SpatialReference.FactoryCode corresponds directly to the SRID expected by SqlServer.Types and/or OGC-compliant utilities?

I can apply the SRID using other techniques, but if this is true it is handy! Thanks so much. /E

Your Answer

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

Browse other questions tagged or ask your own question.