- Version Introduced:10.0
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.
At 10.1 and later, 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:
The response format. The default response format is html. Values: html | json
The array of geometries to be offset. The spatial reference of the geometries is specified by sr. The structure of each geometry in the array is the same as the structure of the JSON geometry objects returned by the ArcGIS REST API.
The geometries property is an array of input geometries. All geometries in this array should be of the type defined by the geometryType property.
Specifies the distance for constructing an offset based on the input geometries. If the offsetDistance parameter is positive, the constructed offset will be on the right side of the curve. Left-side offsets are constructed with negative values.
| offsetUnit |
A unit for offset distance. If a unit is not specified, the units are derived from sr.
The offsetHow parameter determines how outer corners between segments are handled. The three options are as follows:
| bevelRatio |
bevelRatio is multiplied by the offset distance, and the result determines how far a mitered offset intersection can be located before it is bevelled. When mitered is specified, bevelRatio is ignored and 10 is used internally. When bevelled is specified, 1.1 will be used if bevelRatio is not specified. bevelRatio is ignored for rounded offset.
| simplifyResult |
If simplifyResult is set to true, self-intersecting loops will be removed from the result offset geometries. The default is false.
Values: false | true
In this example, a polyline is offset by 1,000 meters.
JSON Response syntax
"geometryType" : "<esriGeometryPolyline> | <esriGeometryPolygon>"
"geometries" : [ <geometry1>, <geometry2>, ..., <geometryN> ]
JSON Response example