I have a custom Python Toolbox script. As a part of the Python toolbox, I apply a multi ring buffer and would like the output to be in consistent coordinate system (which happens to be a custom coordinate system) regardless of the input. I am setting the coordinate system with environment manager, but the output is NOT honoring the environment settings and is in the same projection as the input dataset. Here is the code snippet from the larger script:
with arcpy.EnvManager(outputCoordinateSystem='PROJCS["alber",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Albers"],PARAMETER["false_easting",0.0],PARAMETER["false_northing",0.0],PARAMETER["central_meridian",-78.0],PARAMETER["standard_parallel_1",40.0],PARAMETER["standard_parallel_2",42.0],PARAMETER["latitude_of_origin",39.0],UNIT["Meter",1.0]]'):
multi_buff = arcpy.MultipleRingBuffer_analysis(input_lyr, os.path.join(scratch_gdb, "multi_buff"), [100, 500], "Meters", "distance", "ALL", "OUTSIDE_ONLY", "GEODESIC")Curiously, I also just tested the Multiple Ring Buffer tool in ArcGIS Pro as well. I set the output coordinate system in the environment settings. The output was not consistently projected into the output coordinate system. Sometimes it would be and sometimes it wouldn't be.
Does anyone have any insight on this? Thank you!