- URL:
- https://<root>/Utilities/Geometry/GeometryServer/offset
- Methods:
GET
- Version Introduced:
- 10.0
Description
The offset
operation is performed on a geometry service resource. This operation constructs geometries that are offset from the given input geometries. If the offset
parameter is positive, the constructed offset will be on the right side of the geometry. Left-side offsets are constructed with negative parameters. Tracing the geometry from its first vertex to the last will give you a direction along the geometry. It is to the right and left perspectives of this direction that the positive and negative parameters will dictate where the offset is constructed. In these terms, you may infer where the offset of even horizontal geometries will be constructed. This operation calls simplify
on the input geometries
.
You can provide arguments to the offset
operation as query parameters defined in the following parameters table:
Request parameters
Property | Details |
---|---|
| Specifies the array of geometries to be offset. The spatial reference of the geometries is specified by The Syntax
Example
|
| Specifies the well-known ID (WKID) or a spatial reference JSON object for the input |
| Specifies the distance for constructing an offset based on the input geometries. If the |
(Optional) | Specifies a unit for offset distance. If a unit is not specified, the units are derived from For a list of valid units, see esriSRUnitType Constants and esriSRUnit2Type Constants. |
| Determines how outer corners between segments are handled. The three options are as follows:
|
(Optional) |
|
(Optional) | If Values: |
| The response format. The default format is Values: |
Example usage
The following is a decoded sample request URL (the actual URL must be encoded) for offset
. In this example, a polyline is offset by 1,000 meters.
JSON Response syntax
{
"geometryType": "<esriGeometryPolyline> | <esriGeometryPolygon>"
"geometries": [<geometry1>, <geometry2>, ..., <geometryN>]
}
JSON Response example
{
"geometryType": "esriGeometryPolyline",
"geometries": [{"paths": [[
[
707.1066865790751,
-707.1068253684905
],
[
2707.106623576966,
1292.8931116294
],
[
2000.7069491716045,
1999.292786034761
],
[
1999.1054152581066,
1999.5526791030704
],
[
1105.5727100790396,
1552.7861799389339
],
[
2105.573006656851,
-447.2137570589565
]
]]}]
}