Skip To Content

Location functions

The following sections contain ArcGIS Arcade expressions that allow you to retrieve job location information managed by ArcGIS Workflow Manager. These expressions can be used for reporting and in tandem with geoprocessing tools and services to perform analysis.

GeoJsonToEsriJson

The GeoJsonToEsriJson expression converts the geometry of the first feature in the specified feature collection that matches the specified geometry type from GeoJSON to EsriJSON format and returns it.

Parameters

GeoJsonToEsriJson(feature_collection, geometry_type)

NameExplanationData type

feature_collection

The feature collection that contains the geometry to be converted.

String

geometry_type

The type of geometry to convert.

String

Output

Converts the geometry of the first feature in the specified feature collection that matches the specified geometry type from GeoJSON to EsriJSON format and returns it as a string.

Expression sample

The following expression converts a point feature from the current job's extended property table from GeoJSON to EsriJSON format:

GeoJSONToEsriJson(JobExtendedProperty($Job, 'assets', 'geojson'),'Point')
Example output
{\"x\":1.1354588060913904e7,\"y\":55660.45186542052}

JobLocation

The JobLocation expression returns the extent of the job location's geometry.

Note:

This expression only returns the extent of the job's location and does not return the job's location geometry.

Parameters

JobLocation(job_id)

NameExplanationData type

job_id

The ID of the job.

String

Output

Returns an extent object constructed from the job's location in MinX, MinY, MaxX, MaxY, WKID format.

Expression sample

The following expression returns the extent of the current job's location:

JobLocation($Job)
Example output
9862243.197380835,5108823.353604797,-9801843.791879544,5133768.0805264525,3857

JobLocationGeometry

The JobLocationGeometry expression returns the geometry associated with a job's location. Supported geometry types include polygon, polyline, or multipoint objects. If the job location is not defined, the expression returns an empty string.

Parameters

JobLocationGeometry(job_id)

NameExplanationData type

job_id

The ID of the job.

String

Output

Returns the geometry object of the specified job.

Expression sample

The following expression returns the geometry object of the current job:

JobLocationGeometry($job)
Example output
{
   "points":[
      [
         -13043713.699145492,
         4033782.993028242
      ]
   ],
   "spatialReference":{
      "latestWkid":3857,
      "wkid":102100
   }
}
{
   "paths":[
      [
         [
            -13044121.111699998,
            4033549.092400003
         ],
         [
            -13045645.036699997,
            4035848.9540000223
         ]
      ]
   ],
   "spatialReference":{
      "latestWkid":3857,
      "wkid":102100
   }
}
{
   "rings":[
      [
         [
            -13046377.218799999,
            4036362.6929000057
         ],
         [
            -13046365.370699998,
            4036363.148600001
         ],
         [
            -13046365.370699998,
            4036372.262600016
         ],
         [
            -13046358.535199998,
            4036344.920700025
         ],
         [
            -13046358.0795,
            4036324.4144
         ],
         [
            -13046376.763100002,
            4036324.4144
         ],
         [
            -13046377.218799999,
            4036362.6929000057
         ]
      ]
   ],
   "spatialReference":{
      "latestWkid":3857,
      "wkid":102100
   }
}

Related topics