Project (Data Management)
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, you can specify the input dataset's coordinate system with the Input Coordinate System parameter. 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 a read-only format). Also you can use the Define Projection tool to permanently assign a coordinate system to the dataset.
-
All types of feature classes (geodatabase feature class, coverage feature class, SDC feature class, and shapefile), feature datasets in a geodatabase and feature layers in ArcGIS applications (ArcMap, ArcScene, and ArcGlobe), are valid input.
-
Coverages, VPF Coverages, raster datasets, and raster catalogs are not supported as input to this tool. To project a Coverage, use the Project tool in Coverage toolbox. Use the Project Raster tool to project raster datasets.
The tool's 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 picked.
- 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 a 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 converting data from WGS 1984 to NAD 1927, you can pick a transformation called NAD_1927_to_WGS_1984_3, and the tool will apply it correctly.
- For a list of transformations and their area of use, see the following knowledge base article: 21327 (http://resources.arcgis.com/content/kbase?fa=articleShow&d=21327 )
- 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 a 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.
-
in_memory is not a valid workspace for the output dataset. The output must be written to a feature class on disk.
-
When projecting the complex data types listed below, certain operations need to be performed on the resulting data:
- Feature dataset containing a network dataset: the network dataset must be rebuilt.
- Feature dataset containing a topology: revalidate the entire extent of the topology.
-
If the input participates in relationship classes (as with feature-linked annotation), the relationship class will be transferred to the output. The exception to this rule relates to stand-alone tables.
-
Depending on the input feature's coordinates and the horizon (valid extent) of the output coordinate system, multipoint, line, and polygon may be clipped or split into more than one part as part of projecting them.
Feature classes participating in a geometric network cannot be projected independently—the whole Feature Dataset containing the network needs to be projected.
Many geoprocessing tools honor the output coordinate system environment setting, and in many workflows you can use this environment setting using the Project tool. For example, the Union tool honors the output coordinate system environment setting, which means you can union several feature classes together, all of which are in a different coordinate system and write the unioned output to a feature class in an entirely different coordinate system.
Selection and definition query on layers are not supported by this tool: all features in the dataset referenced by the layer will be projected. If you want to project selected features only, consider using the Copy Features tool. Copy Features only copies selected features and honors the output coordinate system geoprocessing environment.
When a feature class within a feature dataset is used as input, the output cannot be written to the same feature dataset. This is because feature classes within 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.
Syntax
Parameter | Explanation | Data Type |
in_dataset |
The feature class, feature layer, or feature dataset to be projected. | Feature Layer; Feature Dataset |
out_dataset |
The output dataset to which the results will be written. | Geodataset |
out_coor_system | Valid values are a Spatial Reference object, a file with a .prj extension, or a string representation of a coordinate system. | Coordinate System |
transform_method (Optional) | This method can be used for converting data between two geographic coordinate systems or datums. This optional parameter may be required if the input and output coordinate systems have different datum. Tip: Transformations are bi-directional. For example, if converting data from WGS 1984 to NAD 1927, you can pick a transformation called NAD_1927_to_WGS_1984_3, and the tool will apply it correctly. | String |
in_coor_system (Optional) |
The coordinate system of the input feature class or dataset. This parameter becomes enabled 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 |
Code Sample
The following Python window script demonstrates how to use the Project function in immediate mode.
import arcpy import os input_features = "C:/data/input/projections.gdb/wells" output_features_class = "C:/data/output/wells_UTM11N.shp" install_dir = arcpy.GetInstallInfo()['InstallDir'] out_coordinate_system = os.path.join(install_dir, r"Coordinate Systems/Projected Coordinate Systems/UTM/NAD 1983/NAD 1983 UTM Zone 11N.prj") arcpy.Project_management(input_features, output_features_class, out_coordinate_system)
The following stand-alone script demonstrates how to use Project in a stand-alone script.
# Name: Project_Example2.py # Description: project all feature classes in a geodatabase # import modules import arcpy import os # Set environment settings arcpy.env.workspace = "C:/data/Redlands.gdb" # Set local variables outWorkspace = "c:/data/Redlands11UTM.gdb" # Set output coordinate system to 'NAD 1983 UTM Zone 11N' # by using its factory code 26911 (available in *.prj file) outCS = arcpy.SpatialReference() outCS.factoryCode = 26911 outCS.create() # 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 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) # project data arcpy.Project_management(infc, outfc, outCS)