Automating Geodatabase Replication with Different Spatial References

1258
3
Jump to solution
10-17-2019 09:30 AM
mpboyle
Occasional Contributor III

I really like the idea of geodatabase replication, and one idea we've had recently is to replicate our production data to a separate geodatabase specifically used for web services.  Our production data is in a local State Plane coordinate and we'd like our web environment to be in Web Mercator so that no projection has to be done on the data in order to overlay on Esri standard base maps.

I am aware of this Esri technical article that provides a workflow for initially creating the replica, and it works as expected.

However, I'd like to automate the process of synchronizing our replicas using Python.  When I test this workflow, edits pushed from production to the web replica do not seem to take into account any type of transformation, and when the web replica is overlaid with the production data, you can see the NAD83 and WGS84 datum shift (screenshot below).

Is there any way to account for the datum transformation when automating the replica synchronization?  Having to manually sync the replica using tools within ArcMap really isn't a feasible option for us.

Blue features = production data in NAD83 State Plane

Red features = replicated data in WGS84 Web Mercator

The shifted red features are those that were added AFTER the replica was created and then synchronized.

0 Kudos
1 Solution

Accepted Solutions
NanaDei
Esri Contributor

Review the following article on applying a geographic transformation when synchronizing a replica to determine if it helps with the behavior.

Add the following environment in the python script.

eg: 

arcpy.env.geographicTransformations = "WGS_1984_(ITRF00)_To_NAD_1983"

View solution in original post

3 Replies
NanaDei
Esri Contributor

Review the following article on applying a geographic transformation when synchronizing a replica to determine if it helps with the behavior.

Add the following environment in the python script.

eg: 

arcpy.env.geographicTransformations = "WGS_1984_(ITRF00)_To_NAD_1983"

mpboyle
Occasional Contributor III

Nana Dei‌,

This is exactly what I was looking for, thank you so much!  Edited the test features (blue) in the screenshot above, added the environment variable for the transformation to my python script, and synchronized edits.  Everything lines up now

As a follow-up, I see that the Create Replica tool has an environment variable for geographic transformations as well.  Instead of doing the manual create replica method in ArcMap mentioned in this article, can I just add the same environment variable when creating the replica via a python script using arcpy.CreateReplica?

Thanks again!!!

0 Kudos
NanaDei
Esri Contributor

The 'Create Replica' gp tool doesn't support projecting feature classes into another coordinate system. The following idea is related to the requested functionality.

0 Kudos