ArcGIS Pro

Using the spatial reference class

In this topic

Geographic datasets, such as feature classes, coverages, and rasters, have a spatial reference that defines a dataset's coordinate system, x,y domain, m-domain, and z-domain. Each part of the spatial reference has a number of properties, especially the coordinate system, which defines what map projection options are used to define horizontal coordinates. All this information is available from describing the dataset and accessing its spatial reference property, which is actually another object containing a number of properties.

Creating a spatial reference

It is not often practical to keep all details of a spatial reference inside a Python script. By using a projection file, factory code, or spatial reference name as an argument to the SpatialReference class, you can quickly complete the properties of a spatial reference and use the object as input to a geoprocessing tool. In the following example, the spatial reference is constructed using a factory code (also known as an authority code) supplied as an input argument.

Note:

Note:

Spatial references are sometimes referred to as Projection Engine strings. The Projection Engine (PE) is a library of code that all of ArcGIS uses for defining map projections and transforming from one projection to another.