Output XY Domain (Environment setting)

Tools that honor the Output XY Domain environment will set the specified range to the output geodataset's x,y domain.

Geodatasets created in 9.2 (and later) geodatabases automatically calculate a valid x,y domain based on the coordinate system. This environment is only honored when creating geodatasets in a pre-9.2 geodatabase or when the output geodataset's coordinate system is Unknown.

Usage notes

  • The x,y domain will only be used if the output is a geodatabase feature class, raster catalog, or feature dataset.
  • This environment setting will be ignored if the output is within a geodatabase feature dataset as all geodatasets inside a feature dataset automatically have the same x,y domain.
  • When the output is in a pre-9.2 geodatabase or has an unknown coordinate system, most tools will calculate a valid x,y domain based on the extent of the inputs. Tools that have no input dataset, such as Create Feature Class and Create Feature Dataset, lack necessary information to calculate a valid x,y domain. Therefore, when using them with pre-9.2 geodatabases or an Unknown coordinate system setting, the Output XY Domain setting is still important.
  • When the XY Resolution, as well as the XY Domain, environment is set, the resolution value is used in combination with the domain's origin (MinX and MinY coordinates). This only applies if the output is in a pre-9.2 geodatabase or has an unknown coordinate system. If the output geodataset is in a 9.2 (or later) geodatabase and has a known coordinate system, the XY Domain settings will be ignored entirely. The XY Resolution setting, however, is still honored.
  • The coordinates entered in the environment are assumed to be in the units of the output coordinate system.
  • When the output is a stand-alone geodatabase feature class, if the processing and output geodataset's x,y domain does not cover the extent of the features being processed, an x,y domain large enough to hold all of the features is calculated.
  • To avoid inadvertently generating geodatasets with extremely small x,y resolution values (which can negatively impact performance and storage size), use the XY Resolution geoprocessing environment setting whenever using the XY Domain environment.

Dialog syntax

  • Same as Input—Use the x,y domain from input data.
  • As Specified Below—Use the following fields to specify the coordinate range:
    • Min X—The smallest x-coordinate in the domain
    • Min Y—The smallest y-coordinate in the domain
    • Max X—The largest x-coordinate in the domain
    • Max Y—The largest y-coordinate in the domain

Scripting syntax

arcpy.env.XYDomain = "xMin yMin xMax yMax"

ParameterExplanation

xMin

The minimum x-coordinate value.

Setting XYDomain to an empty string will default to using the x,y domain from input data.

yMin

The minimum y-coordinate value.

xMax

The maximum x-coordinate value.

yMax

The maximum y-coordinate value.

XYDomain syntax

Script example

import arcpy
 
# Set the XY Domain to 
#   xmin of -180
#   ymin of -90
#   xmax of 180
#   ymax of 90
arcpy.env.XYDomain = "-180 -90 180 90"

Related topics