Offset

The “offset” operation allows to remotely calculate copies of geometries specified by the user at a distance also indicated by the user.

The following illustrations show the result of this operation. The blue element is the original and the magenta is the resulting item (left image with the “SimplifyResults” parameter equal to false, and at the right image equal to true). 

Example of request:

http://galileo.icc.cat/arcgis/rest/services/Utilities/Geometry/GeometryServer/offset?sr=25831&geometries={"geometryType":"esriGeometryPolyline","geometries":[{"paths":[[[417800,4584900],[418600,45884900]]]}]}&offsetDistance=50&offsetUnit=&offsetHow=esriGeometryOffsetMitered&bevelRatio=&simplifyResult=false&f=json&token=WgTR74xQdSvkHVECel6pSEijFKWafsP3g9DLA8WYg1sD3ycDBOx4g-Vj_i4xHhus

and related response:

{
 "geometryType": "esriGeometryPolyline",
 "geometries": [{"paths": [[
  [417849.99,4584899.99],[418649.99,4599990.31]
 ]]}]
}

Service parameters

Parameter

Description

f

Response format

Valid values: html | json
Default value: html

geometries

The array of geometries of which the copy is wanted to be generated. The syntax of this parameter should be:

{
"geometryType" : ""
"geometries" : [ , ]
}

sr

Reference system identifier used to describe geometries.

offsetDistance 

Distance from which the copy will be created for each of the geometries. If the value of the distance is positive, the geometries will be created to the right of the original, taking into account the direction of digitalizing each one. Otherwise, it will be placed to the left of the original.

offsetUnit

Unity of distance used in the parameter “maxSegmentLength”. See the list of possible values

offsetHow

Specifies the style applied to the copy construction. The value has to be one of the following:

esriGeometryOffsetMiteredesriGeometryOffsetBevelled | esriGeometryOffsetRounded

Additional information

bevelRatio

Value which is multiplied by the distance indicated at the  "offsetDistance" to determine how far should the replica be created once the 'esriGeometryOffsetBevelled' of the parameter "offfsetHow" has been chosen.

simplifyResult

If affirmative, the internal loops of the copied geometry will be removed.

Valid values: true | false

Default: false

token

Required security key in order to perform this function which is generated by filling in the corresponding form.

Additional information