Skip to content

A spatial reference defines the coordinate system and underlying mathematical model of the earth that is used to interpret the coordinates of a geometry. When working with spatial data, it's important to understand how spatial references are used to ensure that your data is displayed and analyzed correctly. When you add data to a map, edit data, perform analysis, or convert geometries from one spatial reference to another, it's important to understand how spatial references are used in these operations.

Display data in a map

When you create a map, the spatial reference of the first layer you add is used as the spatial reference of the entire map; this is typically the basemap. When a map is rendered, it draws all the data using the same spatial reference so that the data lines up properly. If a group layer is the first layer added to a map, the map will use the spatial reference of the first layer in the group layer. If that layer is also a group layer, the group layer will be searched recursively until a non-group layer is found.

As you add additional layers to your map, you may need to request those layers from the service in the same spatial reference your map is using. Whether or not you must request this depends on what type of layer you’re adding. The following sections describe layer types as they relate to setting your map’s spatial reference.

Graphics overlays

Graphics overlays support on-the-fly reprojection of graphics. On-the-fly reprojection requires extra processing that could slow down the map view rendering time. When you add a graphic to a graphics overlay, it is best if the geometry in the graphic has the same spatial reference as the map. You can explicitly convert geometries to the required spatial reference.

Feature layers from feature services

When using a feature service table created from a feature service from ArcGIS Online or ArcGIS Enterprise, the service supports reprojection. When initialized, the table and its associated feature layer will automatically be set to the same spatial reference as the map. This ensures the data is requested from the service in the correct coordinates, without the need to explicitly define the spatial reference for the feature table.

Feature layers from geodatabase feature tables

Your tables in the geodatabase do not need be in the same spatial references as the map you are adding them to, because on-the-fly reprojection of data from these tables is supported. However, reprojection comes with a cost in drawing performance, and avoiding reprojection can help maximize performance. To control the spatial reference of your tables, ensure the ArcGIS Pro map is using the desired spatial reference before you run the Create Mobile Geodatabase tool. If you are using the services workflow, set the desired spatial reference in the parameters used to generate the geodatabase. For details on the desktop and services workflows, see Offline maps, scenes, and data.

Dynamic map service layers

If these are ArcGIS Online or ArcGIS Enterprise map services, then the server supports reprojection on the fly. When you add an ArcGIS dynamic map service layer to the map, the map image is requested in the map's spatial reference.

Tiled layers

Tiled layers are cached layers. At the time of caching, a spatial reference is used and is therefore predefined for the tiled layer. It's typically not possible to request tiled layers in a different spatial reference from the one defined in the service using that cache (unless the server supports doing this on the fly; most do not). If an ArcGIS tiled layer is added to a map with a different spatial reference from the tiled layer, it cannot be drawn.

Raster layers

Raster layers support on-the-fly reprojection, including datum transformation when needed, provided the raster data includes spatial reference information. A raster layer can be added to a map as either a basemap or an operational layer. When a raster layer is added to a map with a different spatial reference, the layer can be reprojected on-the-fly. If the raster data has an unknown spatial reference or it's spatial reference is invalid, it cannot be reprojected on-the-fly and might cause unexpected results. For example, a raster layer with an unknown spatial reference can only be displayed if it is added to a map that does not have a defined spatial reference; in that case, it is displayed at the origin of the map (0,0).

Edit data

When creating new features from coordinates, the coordinate values must match the spatial reference for the layer; otherwise, the features will not show up in the correct location on the map.

Perform analysis

Geometry objects used for analysis (for example, determining spatial relationships, such as where polygons intersect) require that the spatial reference be known before the analysis is performed. Otherwise, results may not be accurate. Likewise, it's meaningless to compare two geometries or determine their spatial relationship if they have different spatial references. To display a geometry in a map layer, the geometry must have either the same spatial reference as the layer or be projected to the layer's spatial reference. To use two geometries together, they should have the same spatial reference.

Project geometries

When using the geometry engine to convert geometries from one spatial reference to another, the source and destination spatial references must be specified. An appropriate datum transformation is used by default. You can also specify the transformation you want to use. You can also convert strings containing coordinates formatted as latitude and longitude directly to points, and vice-versa. Other types of coordinates such as Universal Transverse Mercator (UTM) and United States National Grid (USNG) are also supported.

Use the GeometryEngine class to project geometries to a different spatial reference. For information about how to choose an appropriate transformation (if necessary), see Datum transformations.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.