0

Using ArcGIS Pro 3.1.2

I have a set of address points in Ohio State Plane South 3402 US Feet (WKID: 3735) I also have a file geodatabase with a dataset set to WGS 1984 Web Mercator (WKID: 3857). If I open ArcGIS Pro (3.1.2) and use the Export Features tool to export the address points to my "web mercator" fgdb, it exports it "properly" (without any shifting of the points). HOWEVER, if I use the exact same python command in a standalone script, the feature class that is created has all of the points shifted down and right about 3 feet (3.06 feet). I'm at a complete loss as to why this is happening... The picture below shows the original address points in green, and the shifted address points in red... No matter what I do, if I export the address points in ArcGIS Pro, everything is good, but if I run it in an arcpy script (outside of ArcGIS Pro), it shifts the points...

Here is the python code I'm using...

import arcpy

with arcpy.EnvManager(outputCoordinateSystem='PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]'):
    arcpy.conversion.ExportFeatures(
        in_features=r"D:\MyPath\AddressPoints.shp",
        out_features=r"D:\MyPath\Temp.gdb\Dataset\ExportedAddressPoints",
        where_clause="",
        use_field_alias_as_name="NOT_USE_ALIAS",
        field_mapping="",
        sort_field=None
    )

enter image description here

1

1 Answer 1

1

Thank you Michael Stimson for guiding me in the right direction...

I was today years old when I learned about geographic transformations... to solve my problem, I simply had to add the following line to my code (in my case, I was converting from Ohio State Plane South to WGS84...)

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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