The Create task creates an area that extends a specified distance around each input point, line, or polygon feature. Buffers are typically used to create areas that can be further analyzed using a task such as Overlay.
For example, if the question is "What buildings are within one mile of the school?", the answer can be determined by creating a one-mile buffer around the school and overlaying the buffer with the layer containing building footprints. The result is a layer of those buildings within one mile of the school.
Request URL
https://<analysis url>CreateBuffers/submitJobRequest parameters
| Name | Required | Type | Default | Description |
|---|---|---|---|---|
inputLayer |
| feature | The point, line, or polygon features to be buffered. | |
distances |
| double | The buffer distance values. | |
field |
| string | The field containing buffer distances. | |
units |
| string | Meters | The units for the buffer distances. |
dissolveType |
| string | None | Specifies how overlapping buffers are processed. |
ringType |
| string | Specifies how multiple-distance buffers are processed. | |
sideType |
| string | Specifies the side of the line that will be buffered when buffering line features, or whether the input polygon is included or excluded when buffering polygon features. | |
endType |
| string | The shape of the buffer at the end of line input features. | |
outputName |
| string | The name of the output feature service. | |
context |
| string | The extent and output spatial reference environments. | |
f |
| string | html | The response format. |
Required
Sometimes required
Optional
inputLayer
feature | required
The point, line, or polygon features to be buffered.
Syntax: As described in detail in the Feature input topic, this parameter can be one of the following:
- A URL to a feature service layer with an optional filter to select specific features
- A feature collection
Examples:
{"url": <feature service layer url >, "filter" : <where clause >} {"layerDefinition" : {}, "feature Set" : {}, "filter" : <where clause >}
distances
double | sometimes required
An array of double values used to buffer the input features. You can enter a single distance value or multiple values, separating each value with a comma.
You must supply values for either the distances or field parameter. Use distances to create buffers with uniform distances for all features.
Examples:
"distances": [4.0] "distances": [4.0, 5.0, 6.0]
field
string | sometimes required
A field from input containing a buffer distance. Multiple distance values per feature are not supported using this method.
You must supply values for either the distances or field parameter. Use field to create buffers that vary distance between features.
Example: "field"
units
string | optional
Default value: Miles or Kilometers
Accepted values: Meters | Kilometers | Feet | Miles | Nautical | Yards
The linear unit to be used with the distance values specified in distances or contained in the field value. The default value depends on whether your user profile is configured for U.S. standard or metric units.
Example: "units"
dissolveType
string | optional
Default value: None
Accepted values: None | Dissolve
Specifies how overlapping buffers are processed in the output.
The following options are available:
None—Overlapping areas are kept.Dissolve—Overlapping areas are combined.
Example: "dissolve
ringType
string | optional
Default value: Disks
Accepted values: Disks | Rings
Specifies how multiple-distance buffers are processed.
Specifies whether the outer buffers should include the areas within the smaller buffers when multiple values are provided in the distances parameter.
The following options are available:
Disks—Larger buffers include areas within one or more smaller buffers. For example, if the distances are 10 and 14, the result will be two buffers, one from 0 to 10 and one from 0 to 14.Rings—Larger buffers do not include areas within one or more smaller buffers. For example, if the distances are 10 and 14, the result will be two buffers, one from 0 to 10 and one from 10 to 14.
Example: "ring
sideType
string | optional
The functionality and accepted values for side depend on whether the input features are lines or polygons.
side is only used for single distance buffers.
Lines
Default value: Full
Accepted values: Full | Right | Left
Specifies the side of the line that will be buffered. In most cases, the buffer should apply to both sides of the line (Full).
The left and right side of the line is determined based on the direction of the line from its start coordinate to its end coordinate and may not represent the same side of the line when displayed spatially. Specifying left or right usually means you know that the line features were created and stored in a particular direction (for example, upstream or downstream in a river network).
The following options are available for line features:
Full—Both sides of the line will be buffered.Right—Only the right side of the line will be buffered.Left—Only the left side of the line will be buffered.
Example: "side
Polygons
Default value: No value
Accepted values: No value | Outside
Specify whether the buffer includes or excludes the polygon being buffered.
The following options are available for polygon features:
- No value—The polygon being buffered is included in the result buffer.
Outside—The polygon being buffered is excluded in the result buffer.
Example: "side
endType
string | optional
Default value: Round
Accepted values: Round | Flat
The shape of the buffer at the end of line input features. At the ends of lines, the buffer can be rounded (Round) or be straight across (Flat).
This parameter is not valid for point or polygon input features and is only used for single distance buffers.
The following options are available:
Round—Buffers will be rounded at the ends of lines.Flat—Buffers will be flat at the ends of lines.
Example: "end
outputName
string | optional
The name of the output layer.
If provided, the task will create a feature service of the results. You define the name of the service. If an output value is not provided, the task will return a feature collection.
Syntax:
{
"serviceProperties": {
"name": "featureServiceName"
}
}You can overwrite an existing feature service by providing the item, service, or name value of the existing feature service and setting the overwrite property to true. Including the service parameter is optional. As described in the Feature output topic, you must either be the owner of the feature service or have administrative privileges to perform the overwrite.
{
"itemProperties": {
"itemId": "52d34e7598e7484188228xxxxxx",
"overwrite": true
}
}context
string | optional
The Context parameter contains the following additional settings that affect task operation:
- Extent (
extent)—A bounding box that defines the analysis area. Only input features that intersect the bounding box will be analyzed. - Output spatial reference (
out)—The output features will be projected into the output spatial reference.SR
Syntax:
{
"extent" : {extent},
"outSR" : {spatial reference}
}Response
When you submit a request, the service assigns a unique job ID for the transaction.
Syntax:
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}After the initial request is submitted you can use job to periodically check the status of the job and messages as described in Check job status. Once the job has successfully completed, use job to retrieve the results. To track the status, you can make a request of the following form:
https://<analysis url>/CreateBuffers/jobs/<jobId>Accessing results
When the status of the job request is esri, you can access the results of the analysis by making a request of the following form:
https://<analysis url>/CreateBuffers/jobs/<jobId>/results/bufferLayer?token=<your token>&f=jsonbufferLayer
features | required
The buffer polygons.
Fields
Depending on the tool configurations, the following fields may be included in buffer:
-
All fields from
input.Layer -
Buffer Distance in [Unit] (
BUFF)—A double value based on distances. This field is not included when_DIST fieldis used for the buffer distance. -
ORIG—The unique ID for the input feature._FID -
Areas in Square Miles or Area in Square Kilometers (
Analysis)—The total area of the buffered feature. The unit in this field is based on whether the value forArea unitsis imperial or metric.
The included fields depend on the dissolve setting and whether the buffer distance is configured using the distances or field parameter.
The following output fields are included when dissolve is None:
| Field name | distances parameter | field parameter |
|---|---|---|
input fields |
|
|
BUFF |
|
|
ORIG |
|
|
Analysis |
|
|
Included
Not included
Request example
{"url":"https://<analysis url>/CreateBuffers/jobs/<jobId>/results/bufferLayer"}The result has properties for parameter name, data type, and value. The contents of value depend on the output parameter value provided in the initial request.
If output is provided, value contains the URL to the feature service layer as follows:
{
"paramName":"bufferLayer",
"dataType":"GPString",
"value":{"url":"<hosted feature service layer url>"}
}See Feature output for more information about how the result layer or collection is accessed.
Licensing
This task requires the following user type and configurations:
- Creator, Professional, or Professional Plus user type
- Publisher or Administrator role, or an equivalent custom role