- URL:
- https://<root>/Utilities/Geometry/GeometryServer/buffer
- Methods:
GET
- Version Introduced:
- 9.3
Description
The buffer
operation is performed on a geometry service resource. The result of this operation is buffered polygons at the specified distances for the input geometry array. Options are available to union buffers and to use geodesic distance. This operation calls simplify
on the input geometries
. You can provide arguments to the buffer
operation as query parameters defined in the following parameters table.
Request parameters
Parameter | Details |
---|---|
| Specifies the array of geometries to be buffered. The spatial reference of the geometries is specified by The Syntax:
Example:
Simple Syntax for point geometries: When using points, in addition to the JSON structures, you can specify the geometries with a simpler comma-separated syntax. Syntax: URL based: For a large set of geometries, you can specify a URL to the input geometries stored in a JSON structure in a file on a public server. The expected format of the file’s contents will be exactly the same as that expected if the geometries were directly embedded in the request. Syntax: |
| Specifies the well-known ID (WKID) of the spatial reference or a spatial reference JSON object for the input |
(Optional) | Specifies the WKID of the spatial reference or a spatial reference JSON object for the returned geometries. For a list of valid WKID values, see Using spatial references. If |
(Optional) | Specifies the WKID of the spatial reference or a spatial reference JSON object in which the geometries are buffered. For a list of valid WKID values, see Using spatial references. If |
| Specifies the distances that each of the input geometries is buffered. The distance units are specified by Syntax
Example
|
(Optional) | Specifies the units for calculating each buffer distance. If For a list of valid units, see esriSRUnitType Constants and esriSRUnit2Type Constants. |
(Optional) | If Values: |
(Optional) | Set |
| The response format. The default response format is Values: |
Example usage
The following is a sample request URL for buffer
demonstrating that the point [-117, 34] is buffered in WGS84 (4326) at a distance of 1,000 meters. The geometry is buffered using the Web Mercator projection (3857), and the output polygon is returned in WGS84 (4326).
https://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/Geometry/GeometryServer/buffer?geometries=-117,34&inSR=4326&outSR=4326&bufferSR=3857&distances=1000&f=pjson
The following is a sample request URL for buffer
demonstrating two polygons that are each buffered in NAD 1983 (4269) by geodesic distances of 10 miles and 50 miles.
https://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/Geometry/GeometryServer/buffer?geometries={"geometryType":"esriGeometryPolyline","geometries":[{"paths":[[[0,0],[0,10]]]},{"paths":[[[20,20],[40,40]]]}]}&inSR=4269&distances=10,50&unit=9035&unionResults=false&geodesic=true&f=pjson
JSON Response syntax
{
"geometries" : [ <geometry1>, <geometry1>, ..., <geometryN> ]
}
JSON Response example
{
"geometries": [
{
"rings": [
[
[
0.0063060740000651094,
-0.14540592099996275
],
[
5.6843418860808015e-014,
-0.14554444699996338
],
[
0.0063060740000651094,
-0.14540592099996275
]
]
]
},
{
"rings": [
[
[
20.006702008000047,
19.854763529000024
],
[
20.000000000000057,
19.854625290000058
],
[
20.006702008000047,
19.854763529000024
]
]
]
},
{
"rings": [
[
[
0.015769745000056901,
-0.72754867099996545
],
[
5.6843418860808015e-014,
-0.72772185799993849
],
[
0.015769745000056901,
-0.72754867099996545
]
]
]
},
{
"rings": [
[
[
20.016698604000055,
19.273275119000061
],
[
20.000000000000057,
19.273102911000024
],
[
20.016698604000055,
19.273275119000061
]
]
]
}
]
}