I have noticed since upgrading to ArcGIS 10.4, the SRID values of our feature classes have changed. All of our production feature classes use NAD 1983 (2011) Iowa State Plane North and are managed in SQL Server 2014 Standard using Geometry as the shape. The SRID for this spatial reference in 10.3 and prior is 103045. Starting at 10.4 the SRID is now 6463. Granted, our end users will never know the difference, and all the properties of the spatial reference are identical. However, I notice a huge difference when trying to run the same spatial queries within SQL Server that use multiple tables, most notably, for those feature classes that are created in 10.4, trying to apply the same spatial query doesn't work at all because the SRID value of the feature class created in 10.4 is different from those created in previous versions.
Below are examples trying to execute an intersect spatial query using a point feature class created in 10.3 (103045) and one created in 10.4 (6463) against an underlying polygon feature class created in 10.3 or prior (103045).
Is there any way of updating the SRID of a feature class without having to re-create the feature class in a current version? This wouldn't be too terrible except any relationships based on Esri system fields, for example, the GlobalID field when using attachments, would be very difficult to re-create because they would be re-generated for the new feature class.
One of the benefits of us maintaining our data in SQL Server is the ability to do these type of spatial queries within the database. By having multiple SRID values for the same coordinate system, we are losing the ability to run these types of queries.
Both feature classes (point shown below and underlying polygon) both have 103045 as SRID --- values are returned in the spatial query where features intersect
Same point feature class, however, created in 10.4 with SRID equal to 6463 and underlying polygon in 103045...no records are returned
Hopefully, someone from Esri can chime in on this...but I found the following workflow seems to work in changing the SRID stored for a feature class from one that was prior to 10.4 to one that is current. I'm sure if someone from Esri does chime in, they will mention that this workflow is not supported since you're monkeying around with back-end tables, but I don't see any other solution that doesn't involve re-creating the feature class, and loading data into it. And, while this may work for some, we use a fair amount of attachments and related tables which often use a GlobalID field as the parent key. These GlobalID values will get assigned new values when loading into a new feature class, so then you are stuck with trying to create a cross-reference between old and new features, personally, not an ideal scenario.
In our situation, most of our enterprise feature classes were created prior to 10.4 and have a SRID value of 103045. Starting at 10.4, the same coordinate system (NAD 1983 (2011) Iowa State Plane North) now has a SRID value of 6463. To our end users, they will likely never notice the difference, however, as an admin and someone that uses spatial queries within Sql Server for a fair amount of analysis and querying, I notice this as a big issue, because queries involving geometries within Sql Server only return values when the tables have the same SRID. So...it is very important for us to have our feature classes using the same SRID values across the board.
With that being said...here is the workflow I found that seems to work (I apologize for the length, but for anyone who may stumble across this when searching for a similar issue, I wanted to be as detailed as possible)...
This seems to have worked for me in migrating existing features from a previous SRID to the current SRID. This is pretty hacky in that you are messing with back-end tables, but this seems to prevent having to try and load features from one feature class to another. If any Esri folks want to chime in and tell me of a better way, I'm all ears ... or if this will cause some sort of catastrophe within our geodatabase, I'd appreciate that as well.
Hello @mpboyle ,
Thanks for sharing ! Interesting. 6 (!) years later, did you face issue with this non supported workflow ? I have been waiting for a year for the following BUG to be solved:
BUG-000152217: In ArcGIS Pro, the Define Projection tool fails to assign a projected coordinate system for Oracle geodatabase feature classes.
Considering some alternatives...
6 years later and haven't had issues. Pretty sure I mention this in my reply, but be sure to test this workflow first!
Thanks for this post. We have a similar issue with Oracle. For various reasons I won't get in to our data is defined as a custom 3TM WGS84 114 but the coordinates are actually NAD83 3TM 114. This issue is not noticed internally as all our data matches. It is only when we share externally that we see the issue. We need to correct the spatial reference of all our data but retain the current correct coordinates.
A re-project is not valid as it would move the data so the DefineProjection tool looks promising at first. However, in testing I have found that it only partially changes the spatial reference of a layer. It seems to update the layer definition in the GDB_ITEMS table but the SRID in the registration tables and on the features still have the old SRID.
I have found that doing a DefineProjection and then a subsequent copy/paste will correct the SRID on the registration tables as well as on the features. Unfortunately, doing a copy/paste on our 4000+ datasets which include complex data types, versioning, archiving, topology, relationship classes and networks would create a total mess. It turns out I came up with the same method as the original poster here, but in my case my testing was done with Oracle. We also have SQL Server but Oracle hosts our most complex data sets.
The attached document details my testing, processes and the various registration values, but I'll include a bit of info in the text here.
As mentioned, the DefineProjection tool only updates the layer definition in GDB_ITEMS but the SRID remains the same. The process below shows proposed method on how to update the SRID without altering geometry for data in Oracle SDE.
Manual update using SQL
This fixes the registration and the geometry without having to alter archiving, versioning, relations classes etc.
Proposed Process:
1) DefineProjection to define as WKID 3776
2) Delete spatial indexes
3) Update SRID on features to same geometry but change the SRID
UPDATE AB_CAL3TM_CHANGE SET SHAPE = SDE.ST_GEOMFROMWKB(SDE.ST_ASBINARY(SHAPE) , 3776);
4) Update the ST_GEOMETRY_COLUMNS to the correct SRID
update SDE.ST_GEOMETRY_COLUMNS SET SRID = 3776 WHERE TABLE_NAME = 'AB_CAL3TM_CHANGE';
UPDATE SDE.LAYERS SET SRID = 86 WHERE TABLE_NAME = ' AB_CAL3TM_CHANGE’; --(this is the srid of a valid nad83 layer)
So far I have only tested this process on a few layers but the results have been good. The one question I have is how do I know which SRID to use for the SDE.LAYERS table? In my testing I have been reading the SDE.LAYERS table to find a record with the desired spatial reference and matching xyzm values. If there is no matching record my next course of action would be to create a layer that has my desired properties via ArcPy and then find the LAYERS.SRID value from that.
If this process proves valid I would script it to handle versioning, archiving, fabric etc.
See the attached document for the full process and please let me know your thoughts or suggestions on this process.