Generate Intersections

URL:
https://<intersection-layer-url>/generateIntersections
Methods:
GET
Required Capability:
The ArcGIS Location Referencing license is required to use this resource.
Version Introduced:
10.8.1

Description

This operation generates intersection points between the parent LRS Network layer and each of the intersecting layers of an LRS Intersection. Internally, it calls the Generate Intersections geoprocessing tool.

Request parameters

ParameterDetails

f

(Optional)

Specifies the response format. The default response format is html.

Values: html | json | pjson

parentNetworkLayerDefinition

(Optional)

Specifies a list of object IDs or an SQL WHERE clause defining the parent network routes on which the operation will be performed. If this parameter is not specified, the operation will be run across the entire network feature class. The operation is not time aware, so it considers all time ranges of the input routes.

Syntax:

1
2
3
4
5
6
7
{
  "objectIds": [<objectId1>, <objectId2>, ...]
}
or
{
  "where": "field1 in ('<value1>', '<value2>', ...)"
}

Example:

1
2
3
4
5
6
7
{
  "objectIds": [2, 5, 7]
}
or
{
  "where": "routeId in ('RA1', 'RB1')"
}

startDate

(Optional)

Specifies the epoch date, which acts as a filter on the Edit Date field of the parent network feature class. Parent network routes edited on or after this date are considered for the operation. If no date is provided, all time slices of the routes are used.

Learn more about Editor Tracking

Syntax:

1
startDate=<epoch date>

Example:

1
startDate=1591813090000

onlyGenerateForRoutesEditedByCurrentUser

(Optional)

Boolean parameter to only consider the parent network routes that were edited by the signed in portal user. The user name is used as a filter on the Editor field of the parent network feature class. The default value is true.

Learn more about Editor Tracking

Values: true | false

gdbVersion

(Optional)

Specifies the geodatabase version to use. If this parameter is not specified, the published map's version is used.

Syntax:

1
gdbVersion=<version>

Example:

1
gdbVersion="user1.version1"

sessionId

(Optional)

Set by a client during long transaction editing on a branch version. The sessionId parameter value is a GUID that clients establish at the beginning and use throughout the edit session. The sessonId parameter ensures isolation during the edit session.

Syntax:

1
sessionId=<guid>

Example:

1
sessionId="{E81C2E2D-C6A7-40CB-BF61-FB499E53DD1D}"

returnEditMoment

(Optional)

Specifies whether the response reports the time edits that were applied. If returnEditMoment is set to true, the server returns the time edits that were applied in the response's editMoment key. The default value is false.

Values: true | false

returnServiceEditsOption

(Optional)

Returns features edited due to the geodatabase behavior that results from applying the edits. For example, if a feature is deleted and it is the origin in a composite relationship, the destination feature is automatically deleted from the geodatabase. If returnServiceEditsOption is set to originalAndCurrentFeatures, the deleted destination feature is returned along with a reference to the deleted original feature in the response. Note that, even for deletions, the geometry and attributes of the edited feature are returned.

Results returned from applyEdits are organized layer by layer. If returnServiceEditsOption is set to originalAndCurrentFeatures, each layer can have edited features returned in an editedFeatures object.

Service-level applyEdits response structure:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[
  {
    id
    addResults
    updateResults
    deleteResults
    attachments: {
      addResults
      updateReults
      deleteResults
    }
    editMoment
    editedFeatures
    exceededTransferLimit
  },
  {
  ...
  }
]

The editedFeatures object returns full features, including the original features prior to deletion, the original and current features for updates, and the current rows for inserts that can contain implicit changes (for example, as a result of a calculation rule).

editedFeatures response structure:

1
2
3
4
5
6
7
8
9
{
  "editedFeatures": [
    {
      "adds": [ <feature1>, <feature2>], 	// current features
      "updates": [[<originalFeature3>, < currentFeature3>], [<originalFeature4>, < currentFeature4>]],
      "deletes": [ <feature5>, <feature6>]	// original features
    },
  ]
}

The response includes no editedFeatures values and exceededTransferLimit as true if the count of edited features to return is more than the maxRecordCount value. If clients are using this parameter to maintain a cache, they should invalidate the cache when exceededTransferLimit is returned as true. If the server encounters an error when generating the list of edits in the response, exceededTransferLimit is returned as true.

Edited features are returned in the spatial reference of the feature service as defined by the services spatialReference object or by the spatialReference value of the layers extent object.

The default value is none, which does not include editedFeatures values.

Values: none | originalAndCurrentFeatures

Example usage

The following examples demonstrate generating all intersections or for a selection set.

Example 1

URL to call to generate all possible intersections:

1
https://sampleserver/server/rest/services/MyLRS/MapServer/exts/LRServer/intersectionLayers/5/generateIntersections?parentNetworkLayerDefinition=&startDate=0&onlyGenerateForRoutesEditedByCurrentUser=false&gdbVersion=SDE.test2&sessionId={91FB4126-F4D8-410E-96A2-000E8463A8A4}&returnServiceEditsOption=originalAndCurrentFeatures&returnEditMoment=true&f=json

Example 2

URL to call to generate intersections on a selection set:

1
https://sampleserver/server/rest/services/MyLRS/MapServer/exts/LRServer/intersectionLayers/5/generateIntersections?parentNetworkLayerDefinition={"objectIds":[174788,219331]}&startDate=0&onlyGenerateForRoutesEditedByCurrentUser=false&gdbVersion=SDE.test2&sessionId={91FB4126-F4D8-410E-96A2-000E8463A8A4}&returnServiceEditsOption=originalAndCurrentFeatures&returnEditMoment=true&f=json

JSON response syntax

Query this job URL to get progress updates and results of the operation.

1
2
3
{
  "statusURL": "<jobIdURL>"
}

JSON response example

1
2
3
{
  "statusURL": "https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/jobs/j3c0a00b4314349eb8e4ff6ff7ac2db5d"
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close