Output Coordinate System (Environment setting)
Tools that honor the Output Coordinate System environment will create output geodatasets with the specified coordinate system.
Processing (calculation of geometric relationships and modification of geometries) occurs in the same coordinate system as the output geodataset. This environment overrides the default coordinate system on output geodatasets created by geoprocessing tools. For a description of how the default output coordinate system is determined, see Spatial reference and geoprocessing.
- When the Output Coordinate System environment is different than the input feature class' coordinate system, the input features are projected to the output coordinate system during tool execution. This projecting of the features will not affect the input feature class.
- A projection will not occur if either the input or output coordinate system is Unknown. If this does occur, then the input feature's coordinates are assumed to be in the same coordinate system as the output coordinate system.
- When the input and output coordinate system require a geographic transformation, set the Geographic Transformations environment.
This specifies the output features coordinate system of geodatasets created by geoprocessing tools.
- Same As Input—The output geodataset will have the same coordinate system as the input. This is the default.
- As Specified Below—Choose the coordinate system for output geodatasets. Specify a coordinate system name or browse using the Spatial Reference Properties dialog box.
- Same as Display—In ArcMap, ArcScene, or ArcGlobe, the coordinate system of the current display will be used.
- Same as Layer <name>—All layers are listed, and you can choose one as the coordinate system. Like the Same as Display option, the coordinate system of the layer is read and stored. The next time you examine the Output Coordinate System setting, it will read As Specified Below.
arcpy.env.outputCoordinateSystem = coordinate_system
By default, the coordinate system of an output will be the same as that of the input. Otherwise, the Output Coordinate System can be set using any of the following:
import arcpy # Set the workspace, outputCoordinateSystem and geographicTransformations environments arcpy.env.workspace = "c:/data" arcpy.env.outputCoordinateSystem = "Coordinate Systems/Projected Coordinate Systems/UTM/WGS 1984/Northern Hemisphere/WGS 1984 UTM Zone 18N.prj" arcpy.env.geographicTransformations = "Arc_1950_To_WGS_1984_5; PSAD_1956_To_WGS_1984_6" arcpy.Buffer_analysis("roads.shp", "roads_buffer.shp", "10 meters")