Label | Explanation | Data Type |
Input Dataset or Feature Class | The feature class, feature layer, feature dataset, scene layer, scene layer package, or OGC Geopackage to be projected. | Feature Layer; Feature Dataset; Scene Layer; Building Scene Layer; File |
Output Dataset or Feature Class | The output dataset to which the results will be written. | Feature Class; Feature Dataset; File |
Output Coordinate System | The coordinate system to which the input data will be projected. | Coordinate System |
Geographic Transformation (Optional) | This method can be used to convert data between two geographic coordinate systems or datums. This optional parameter may be required if the input and output coordinate systems have different datums. Tip:The tool automatically applies a default transformation. You can choose a different transformation from the drop-down list. Transformations are bidirectional. For example, if you're converting data from WGS84 to NAD 1927, you can choose the NAD_1927_to_WGS_1984_3 transformation, and the tool will apply it correctly. The parameter provides a drop-down list of valid transformation methods. See the usage tips for additional information about how to choose one or more appropriate transformations. | String |
Input Coordinate System (Optional) | The coordinate system of the input feature class or dataset. This parameter becomes active when the input has an unknown or unspecified coordinate system. This allows you to specify the data's coordinate system without having to modify the input data (which may not be possible if the input is in read-only format). | Coordinate System |
Preserve Shape
(Optional) | Specifies whether extra vertices will be added to the output lines or polygons so their projected shape is more accurate.
| Boolean |
Maximum Offset Deviation
(Optional) | The distance a projected line or polygon can deviate from its exact projected location when the Preserve Shape parameter is checked. The default is 100 times the x,y tolerance of the spatial reference of the output dataset. | Linear Unit |
Vertical (Optional) | Specifies whether a vertical transformation will be applied. This parameter is only active when the input and output coordinate systems have a vertical coordinate system and the input feature class coordinates have z-values. Also, many vertical transformations require additional data files that must be installed using the ArcGIS Coordinate Systems Data installation package. When this parameter is checked, the Geographic Transformation parameter can include ellipsoidal transformations and transformations between vertical datums. For example, ~NAD_1983_To_NAVD88_CONUS_GEOID12B_Height + NAD_1983_To_WGS_1984_1 transforms geometry vertices that are defined on NAD 1983 datum with NAVD 1988 heights into vertices on the WGS84 ellipsoid (with z-values representing ellipsoidal heights). The tilde (~) indicates the reversed direction of transformation. This parameter is not compatible with the Preserve Shape parameter.
| Boolean |
Summary
Projects spatial data from one coordinate system to another.
Usage
If the input feature class or dataset has an unknown or unspecified coordinate system, use the Input Coordinate System parameter to specify one. This parameter allows you to specify the data's coordinate system without having to modify the input data. Use the Define Projection tool to permanently assign a coordinate system to the dataset.
Coverages, VPF coverages, raster datasets, and raster catalogs are not supported as input to this tool. Use the Project Raster tool to project raster datasets.
The Geographic Transformation parameter is optional. When no geographic or datum transformation is required, no drop-down list will appear on the parameter, and it is left blank. When a transformation is required, a drop-down list will be generated based on the input and output datums, and a default transformation will be applied.
- For example, a geographic transformation is not required when projecting from GCS_North_American_1983 to NAD_1983_UTM_Zone_12N because both the input and output coordinate systems have the NAD_1983 datum. However, projecting from GCS_North_American_1983 to WGS_1984_UTM_Zone_12N requires a geographic transformation because the input coordinate system uses the NAD_1983 datum, while the output coordinate system uses the WGS_1984 datum.
Tip:
Transformations are bidirectional. For example, if you're converting data from WGS84 to NAD 1927, you can choose the NAD_1927_to_WGS_1984_3 transformation, and the tool will apply it correctly.
- All transformations in ArcGIS Pro can be found in the Geographic and vertical transformation tables.
- For example, a geographic transformation is not required when projecting from GCS_North_American_1983 to NAD_1983_UTM_Zone_12N because both the input and output coordinate systems have the NAD_1983 datum. However, projecting from GCS_North_American_1983 to WGS_1984_UTM_Zone_12N requires a geographic transformation because the input coordinate system uses the NAD_1983 datum, while the output coordinate system uses the WGS_1984 datum.
When projecting the complex data types listed below, certain operations must be performed on the resulting data:
- A feature dataset containing a network dataset: the network dataset must be rebuilt
- A feature dataset containing a topology: the topology should be validated again
If the input participates in relationship classes (as with feature-linked annotation), the relationship class will be transferred to the output. The exception is participating stand-alone tables.
Depending on the input feature's coordinates and the horizon (valid extent) of the output coordinate system, multipoints, lines, and polygons may be clipped or split into more than one part when projecting them. Features that fall completely outside the horizon will be written to the output with a null shape. These can be deleted using the Repair Geometry tool.
It is recommended that all inputs for a project be projected to the same coordinate system before performing the analysis. When all inputs are in the same coordinate system, you will avoid possible performance and functional issues caused by projecting data on the fly.
In rare cases, projecting feature geometry may cause features to be transformed in a way that makes them invalid. Use the Check Geometry tool to detect invalid geometry and the Repair Geometry tool to repair any geometry issues.
Feature classes participating in a geometric network cannot be projected independently; the entire feature dataset containing the network must be projected.
Many geoprocessing tools honor the Output Coordinate System environment, and in many workflows, you can use this environment instead of the Project tool. For example, the Union tool honors the Output Coordinate System environment, which means you can union several feature classes together, all of which are in a different coordinate system, and write the output to a feature class in a different coordinate system.
Selection and definition queries on layers are supported by this tool. Only selected features in the layer will be projected when the selection or query is defined.
When a feature class in a feature dataset is used as input, the output cannot be written to the same feature dataset. This is because feature classes in a feature dataset must all have the same coordinate system. In this case, the output feature class will be written to the geodatabase containing the feature dataset.
When the Preserve Shape parameter is checked, the tool creates features that accurately represent their projected location. The tool adds extra vertices to the feature when projecting. The extra vertices preserve the projected shape of the feature. This parameter is useful when a line or polygon has few vertices. If the parameter is not checked, the existing vertices will be projected, and an output feature may not be accurately located in the new projection.
The Maximum Offset Deviation parameter specifies how many vertices are added. The parameter value defines the maximum distance a projected feature can be offset from its exact projected location. The tool adds more vertices if the value is small. Use a value that suits your needs. For example, if the output is for general small-scale cartographic display, a large deviation may be acceptable. If the output is for large-scale, small-area analysis, a smaller deviation may be better.
To perform a vertical transformation, check the Vertical parameter. By default, the Vertical parameter is inactive and becomes active when the input and output coordinate systems have a vertical coordinate system (VCS) and the input feature class coordinates have z-values. Also, additional data (coordinate systems data) setup must be installed on the system.
When you select the output coordinate system, you can choose the geographic or projected coordinate system and a VCS. If the input and output VCS are different, an appropriate vertical and an optional geographic (datum) transformation are available. If a transformation should be applied in the opposite direction to its definition, choose the entry with the tilde (~) in front of the name.
Parcel fabrics are projected by projecting the feature dataset containing the parcel fabric. Individual feature classes controlled by the parcel fabric cannot be projected separately. Linear units, area units, and point coordinates will be updated to match the units and coordinates of the target spatial reference.
Parameters
arcpy.management.Project(in_dataset, out_dataset, out_coor_system, {transform_method}, {in_coor_system}, {preserve_shape}, {max_deviation}, {vertical})
Name | Explanation | Data Type |
in_dataset | The feature class, feature layer, feature dataset, scene layer, scene layer package, or OGC Geopackage to be projected. | Feature Layer; Feature Dataset; Scene Layer; Building Scene Layer; File |
out_dataset | The output dataset to which the results will be written. | Feature Class; Feature Dataset; File |
out_coor_system | Valid values are a SpatialReference object, a file with a .prj extension, or a string representation of a coordinate system. | Coordinate System |
transform_method [transform_method,...] (Optional) | This method can be used to convert data between two geographic coordinate systems or datums. This optional parameter may be required if the input and output coordinate systems have different datums. To get a list of valid transformations, use the arcpy.ListTransformations method. The most appropriate transformation is usually the first one in the returned list. The list is sorted by amount of overlap of the data versus the areas of use of the transformations. If two or more transformations have the same amount of overlap with the data, the transformation accuracy values are used as a secondary sort parameter. Tip:Transformations are bidirectional. For example, if you're converting data from WGS84 to NAD 1927, you can choose the NAD_1927_to_WGS_1984_3 transformation, and the tool will apply it correctly. If no transformation is provided, a default transformation is used. This default transformation is suitable for general mapping applications but may not be suitable for applications that require precise locational accuracy. | String |
in_coor_system (Optional) | The coordinate system of the input feature class or dataset. When the input has an unknown or unspecified coordinate system, you can specify the data's coordinate system without having to modify the input data (which may not be possible if the input is in read-only format). | Coordinate System |
preserve_shape (Optional) | Specifies whether extra vertices will be added to the output lines or polygons so their projected shape is more accurate.
| Boolean |
max_deviation (Optional) | The distance a projected line or polygon can deviate from its exact projected location when the preserve_shape parameter is set to PRESERVE_SHAPE. The default is 100 times the x,y tolerance of the spatial reference of the output dataset. | Linear Unit |
vertical (Optional) | Specifies whether a vertical transformation will be applied. This parameter is only enabled when the input and output coordinate systems have a vertical coordinate system and the input feature class coordinates have z-values. Also, many vertical transformations require additional data files that must be installed using the ArcGIS Coordinate Systems Data installation package. This parameter is not compatible with the preserve_shape parameter.
| Boolean |
Code sample
The following Python window script demonstrates how to use the Project function in immediate mode.
import arcpy
# input data is in NAD 1983 UTM Zone 11N coordinate system
input_features = r"C:/data/Redlands.shp"
# output data
output_feature_class = r"C:/data/Redlands_Project.shp"
# create a spatial reference object for the output coordinate system
out_coordinate_system = arcpy.SpatialReference('NAD 1983 StatePlane California V FIPS 0405 (US Feet)')
# run the tool
arcpy.Project_management(input_features, output_feature_class, out_coordinate_system)
The following stand-alone script demonstrates how to use the Project function in a stand-alone script.
# Name: Project_Example2.py
# Description: Project all feature classes in a geodatabase
# Requirements: os module
# Import system modules
import arcpy
import os
# Set environment settings
arcpy.env.workspace = "C:/data/Redlands.gdb"
arcpy.env.overwriteOutput = True
# Set local variables
outWorkspace = "C:/data/Redlands_utm11.gdb"
try:
# Use ListFeatureClasses to generate a list of inputs
for infc in arcpy.ListFeatureClasses():
# Determine if the input has a defined coordinate system, can't project it if it does not
dsc = arcpy.Describe(infc)
if dsc.spatialReference.Name == "Unknown":
print('skipped this fc due to undefined coordinate system: ' + infc)
else:
# Determine the new output feature class path and name
outfc = os.path.join(outWorkspace, infc)
# Set output coordinate system
outCS = arcpy.SpatialReference('NAD 1983 UTM Zone 11N')
# run project tool
arcpy.Project_management(infc, outfc, outCS)
# check messages
print(arcpy.GetMessages())
except arcpy.ExecuteError:
print(arcpy.GetMessages(2))
except Exception as ex:
print(ex.args[0])