Skip To Content

Extent

Tasks that have the extent property in their context parameter will only process features that overlap the specified extent. The output features will have an extent that is the same or larger than the extent, as illustrated below.

Extent syntax:

"extent": {
  "xmin": <minimum x-coordinate>
  "ymin": <minimum y-coordinate>
  "xmax": <maximum x-coordinate>
  "ymax": <maximum y-coordinate>
  "spatialReference": {"wkid": <spatial reference well-known identifier>}
}

See the Spatial Reference topic for information about setting a wkid and the spatialReference property.

Extent example:

"extent": {
  "xmin": -122.68,
  "ymin": 45.53,
  "xmax": -122.45,
  "ymax": 45.6,
  "spatialReference": {
    "wkid": 4326
  }
}

extent is useful when you need to process only a portion of a larger dataset. You can think of this setting as a rectangle used to select input features for processing. Any feature that overlaps the rectangle defined by the extent will be processed. Note that the rectangle is used only to select features, not clip them. The extent of the output dataset may be larger than the extent setting to account for features that overlap the extent rectangle.

extent

You may use a different spatial reference for analysis (processSR) and for defining the extent. For example, you can define the extent in wkid 4326 (GDC_WGS_1984) and analyze in wkid 3857 (WGS_1984 Meb Mercator - auxiliary sphere):

Extent and outSR example:


"context" : {
  "extent": {
    "xmin": -122.68,
    "ymin": 45.53,
    "xmax": -122.45,
    "ymax": 45.6,
    "spatialReference": {
      "wkid": 4326
    }
  },
  "processSR" : {"wkid" : 3857}
}