Skip To Content

Export Network

Available with Location Referencing license.

Description

License:

The ArcGIS Location Referencing license is required to use this resource.

This operation exports an LRS Network then maintains the differences (deltas), which can be queried to list changes that have been made to route features during a period of time. External systems can use this information at regular intervals to synchronize themselves to route edits in the LRS Network.

Request parameters

ParameterDetails
f

Optional parameter to specify the response format. The default response format is html.

Values: html | json

lastInvokedTime

Description: Optional parameter specifying the time value of the last time this operation was executed. When an external system makes an export network request, the time of the request is returned in the response (based on the date and time of the ArcGIS Server system time). The external system should pass this date and time back to this call on subsequent requests if they only want changes to the LRS since the last time they made this request.

If no value is provided, all routes and related information are exported across all time.

If the lastInvokedTime parameter is provided and the lrsTime and lastLrsTime parameter are not, all changed routes since lastInvokedTime are exported.

Changed routes are exported according to the provided time parameters (lastInvokedTime, lrsTime, lastLrsTime), which act as a temporal filter. These constraints result in one of the following:

  • Routes that were edited between the last and current invocation time (the LRS edit log transaction date) are exported for the desired LRS time (the start and end time on a route).
  • Routes that were edited before the last time of invocation (the LRS edit log edit transaction date) that apply to the current LRS time, but not to the previous LRS time (start and end time on route), are exported.

The parameter value for lastInvokedTime is a number that represents the number of milliseconds since epoch (January 1, 1970) in UTC.

Syntax: lastInvokedTime=<DateTime>

Example: lastInvokedTime=1609459200 (1 Jan 2021 00:00:00 GMT)

lrsTime

Optional parameter to specify the temporal view date on which route edits are inspected.

ArcGIS Location Referencing stores routes and other network details with different representations across time. This parameter can be used to focus the time view of the network changes to be processed, which is especially useful for external systems that don't support multiple representations of the LRS network across time. For such systems, a specific time snapshot of the LRS can be requested.

If no value is provided, then all routes and related information are exported across all time.

If a value is provided, it is used as a temporal filter to export changed routes, along with lastInvokedTime and lastLrsTime.

The parameter value for lrsTime is a number that represents the number of milliseconds since epoch (January 1, 1970) in UTC.

Syntax: lastLrsTime=<DateTime>

Example: lastLrsTime=1609459200 (1 Jan 2021 00:00:00 GMT)

lastLrsTime

Optional parameter to specify the lastLrsTime that the caller used in the previous call to this service.

The provided value is used to identify route changes that have already been exported in previous invocations.

If a value is provided, it is used as a temporal filter along with lastInvokedTime and lastLrsTime to export changed routes.

If no value is provided, all routes and related information are exported across all time.

The parameter value for lastLrsTime is a number that represents the number of milliseconds since epoch (January 1, 1970) in UTC.

Syntax: lastLrsTime=<DateTime>

Example: lastLrsTime=1609459200 (1 Jan 2021 00:00:00 GMT)

outputFormat

Optional parameter that determines the data format of the output event records.

The following output formats are supported:

  • FGDB—Zipped File Geodatabase.
  • JSON—Zipped JavaScript Object Notation file.

Syntax: outputFormat=<format>

Example 2: outputFormat="FGDB"

Example 1: outputFormat="JSON"

outputSrWkid

Description: Optional parameter to specify the spatial reference to output.

Syntax: outputSrWkid=<integer>

Example: outputSrWkid=2250 (NAD1983 StatePlane Massachusetts Island FIPS 2002)

precision

Description: Optional parameter that defines the number of decimal places to use for rounding measure values.

Syntax: precision=<integer>

Example: precision=5

lrmTranslations

Description: Optional parameter to specify LRS Networks for which to translate exported routes.

Syntax: lrmTranslations=<NetworkIds>

Example: lrmTranslations="3,5"

gdbVersion

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

Syntax: gdbVersion=<version>

Example: gdbVersion="user1.version1"

Output file format

The network can be exported as either a file geodatabase or as a JSON-formatted file. The file geodatabase format is the default.

In FGDB format, the output file contains one feature class (Route) and five tables (ExportDetails, Networks, Gap, Concurrency, and LrmTranslation). In JSON format, the output contains one JSON file each for the route and the tables.

The following tables define the schema of the output file geodatabase.

Note:

All of the fields in the output feature class and tables are nullable.

Route feature class

Column nameData typeLength

Network_ID

Long

N/a

Route_ID

Text

255

Start_Measure

Double

N/a

End_Measure

Double

N/a

Start_Date

Date

N/a

End_Date

Date

N/a

ExportDetails table

Column nameData typeLength

LRS_Time

Date

N/a

Last_LRS_Time

Date

N/a

Invoked_Time

Date

N/a

Last_Invoked_Time

Date

N/a

Out_Sr_Wkid

Long

N/a

Precision

Long

N/a

Lrm_Translations

Text

100

Networks table

Column nameData typeLength

Network_ID

Long

N/a

Network_Name

Text

100

Units_of_Measure

Long

N/a

Gap table

Column nameData typeLength

Route_ID

Text

255

Gap_Start_Measure

Double

N/a

Gap_End_Measure

Double

N/a

Gap_Type

Long

N/a

Start_Date

Date

N/a

End_Date

Date

N/a

Concurrency table

Column NameData TypeLength

Dominant_Route_ID

Text

255

Dominant_Start_Measure

Double

N/a

Dominant_End_Measure

Double

N/a

Subordinate_Route_ID

Text

255

Subordinate_Start_Measure

Double

N/a

Subordinate_End_Measure

Double

N/a

Start_Date

Date

N/a

End_Date

Date

N/a

LrmTranslation table

Column NameData TypeLength

Base_Route_ID

Text

255

Base_Start_Measure

Double

N/a

Base_End_Measure

Double

N/a

Translated_Network_ID

Long

N/a

Translated_Route_ID

Text

255

Translated_Start_Measure

Double

N/a

Translated_End_Measure

Double

N/a

Start_Date

Date

N/a

End_Date

Date

N/a

Note:

The operation runs if one of the following is true:

  • If time parameters are not provided
  • If all time parameters are provided
  • If only the lastInvokedTime parameter is provided

In all other cases, this operation will not run. For example, this operation will not run if lrsTime, lastLrsTime, or lrsTime and lastLrsTime are used.

Example usage

The following example URL exports a network using all time parameters.

https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/networkLayers/6/ exportNetwork?lastInvokedTime=1609200000000&lrsTime=1609200000000&lastLrsTime=1609027200000&outputFormat=FGDB&outputSrWkid=&precision=7&lrmTranslations&gdbVersion=ExportNetwork&f=html

JSON Response syntax

The following is an example of response syntax for a statusURL:


{
  "statusURL": <jobIdURL>
}

JSON Response example

Initial status response

The following is an example statusURL returned with a jobIdURL, which is used to make additional status calls:


{"statusURL":"https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/jobs/je9b6aa1da1904a23ab0d1a5513fba6f5"}

Subsequent status response

The subsequent call uses the jobIdURL returned above.


{
  "status": "esriJobSucceeded",
  "percentComplete": 100,
  "exportNetworkJobResult ": 
  {
    "url": <URL>,
    "invokedTime": <dateTime>
  }
}

The following example demonstrates a response for calls using the jobIdURL returned above:


{
  "status": "esriJobSucceeded",
  "percentComplete": 100,
  "exportNetworkJobResult": {
    "url": https://sampleServer/server/rest/directories/arcgisoutput/_ags_lrs_429B4209-7B0B-4A15-B7FD-2696DB757706.zip,
    "invokedTime": 1611137603000
  }
}