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.

Usage notes

Dialog syntax

This specifies the output features coordinate system of geodatasets created by geoprocessing tools.

Scripting syntax

arcpy.env.outputCoordinateSystem = coordinate_system

Parameter

Explanation

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:

outputCoordinateSystem syntax

Script example

Project data into new coordinate system while buffering

import arcpy

# Set the workspace, outputCoordinateSystem and geographicTransformations environments
arcpy.env.workspace = "c:/data"
arcpy.env.outputCoordinateSystem = arcpy.SpatialReference("WGS 1984 UTM Zone 18N")
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")

Verwandte Themen

9/11/2013