Spatial reference and geoprocessing

The spatial reference of a geodataset is made up of the following:

Learn more about the properties of a spatial reference

These spatial reference properties can have significant impact on the performance and results generated by a geoprocessing tool.

The spatial reference of the output dataset and the spatial reference in which the processing occurs are one and the same. Another way to state this is that tools always process data in the spatial reference of the output dataset.

What is the default output spatial reference?

Geoprocessing tools determine the output spatial reference using the following logic:

How to override the default spatial reference's properties

The geoprocessing environments listed below can be used to override the following default output spatial reference properties. If the output is inside a feature dataset, the coordinate system, as well as the XY and Z properties (except Z awareness), will always be that of the feature dataset .

The following environments can be used regardless of whether the output is stand alone or in a feature dataset:

For shapefile output, see Geoprocessing considerations for shapefile output.

Tools with multiple inputs—coordinate system affects tool performance

Geoprocessing tools that take multiple inputs, such as tools in the Analysis toolbox or Spatial Analyst toolbox, require all features or rasters to be in a common coordinate system to compute spatial relationships. Consider the Intersect tool, which computes the geometric intersection of multiple feature classes. Suppose that five feature classes are specified as input; the first feature class input has a UTM coordinate system while the remaining four feature classes have an Albers coordinate system. Because the first feature class is in UTM, the features in the other four feature classes will first be projected from Albers to UTM by the Intersect tool before it begins processing them. Projecting these datasets can significantly degrade performance; it may be far more efficient to project the one feature class from UTM to Albers rather than four feature classes from Albers to UTM. Conversely, if the feature class in UTM has many features compared to the total number of features in the other four feature classes, it would be more efficient to project the other feature classes from Albers to UTM.

To improve performance of the above situation, you can employ one of two techniques:

Coordinate system for ArcGIS Server geoprocessing services

Applications that are clients to an ArcGIS Server geoprocessing service can set the processing coordinate system. This is not recommended practice, and in reality, few clients will set the processing coordinate system, but it is a possibility. When the client sets a processing coordinate system, the tools within the geoprocessing service will first project all data to this coordinate system, which could greatly impact performance of the service. For example, the client could set the processing coordinate system to WGS84 (a geographic coordinate system). Continuing with the Intersect tool example above, all five datasets would be transformed into WGS84 before the Intersect tool began computing the intersection. You can lock the processing coordinate system for your service by explicitly setting the output coordinate system environment variable in your model or script before you publish it.

Avoid unknown coordinate systems

Processing data with an appropriate coordinate system allows better default values for tolerance, resolution, and domains.

You should avoid processing data with an unknown coordinate system because the default tolerances may not be appropriate for the tool. The XY Tolerance default for an unknown coordinate system is 0.001 units—this is an exceedingly large value if the data's coordinates are in a geographic coordinate system where one unit (decimal degrees) represents up to 110 kilometers distance on the earth's surface, meaning the tolerance used for processing could be as large as 110 meters.

For help on how to proceed if the data has an unknown coordinate system, see Identifying an unknown coordinate system.

Coordinate system affects tool result

The spatial or topological relationship shared by two geometries in one coordinate system may change when projected to a different coordinate system. For example, the illustration below shows a blue line that connects the cities of Jakarta and Wellington. Depending on the coordinate system in which the data is projected and processed, the blue line connecting the two cities may or may not intersect the city of Alice Springs. It is important to choose a coordinate system that is appropriate for the data.

Projection and spatial relationships

Setting the coordinate system environment in ModelBuilder

The output coordinate system environment can be set for an individual process (a process is a tool plus its input and output data) or for the entire model. Setting the environment at the process level affects only the execution of the individual process. Setting the environment at the model level affects all processes in the model.

To set the coordinate system at the process level

  1. In ModelBuilder, right-click a tool element.
  2. Click Make Variable > From Environment > Output Coordinates > Output Coordinate System. A new variable named Output Coordinate System is created and connected to the tool.
  3. Double-click Output Coordinate System and enter the appropriate coordinate system, which is usually the coordinate system of the largest geodataset input to the tool.

To set the coordinate system at the model level

  1. In ModelBuilder, click Model > Model Properties. Alternatively, in the Catalog or ArcToolbox window, right-click the model and click Properties.
  2. Click the Environments tab.
  3. Expand Output Coordinates.
  4. Check Output Coordinate System.
  5. Click the Values button.
  6. On the Environment Settings dialog box, expand Output Coordinate Settings.
  7. In the Output Coordinate System list, choose As Specified Below.
  8. Click the browse button to browse for an existing coordinate system, or choose a model variable in the drop-down list.
Learn more about managing environments in models

5/14/2012