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 spatial
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](/rest/services-reference/enterprise/static/524ce8c141d14d59a39b0153009e93df/9b7bd/GUID-99CDA8D5-A59A-4C4A-873B-0EB59E5F0C5D-web.png)
You may use a different spatial reference for analysis (process
) 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}
}