Select to view content in your preferred language

Linear Referencing in ArcGIS Enterprise SDK

361
1
05-28-2025 11:29 PM
Labels (1)
anbinh
by
Frequent Contributor

Hi all,

I'm currently working on rewriting a legacy SOE (originally built using ArcObjects SDK 10.1) using the ArcGIS Enterprise SDK (Java) for compatibility with ArcGIS Enterprise 11.3.

In the original SOE, IRouteLocator and IRouteLocator2 from the com.esri.arcgis.location package was used to locate geometry from route and measure values for linear referencing. Specifically, locate and identify functions from IRouteLocator.  

In exploring the ArcGIS Enterprise SDK, I noticed that there's an IRouteLocatorName interface in the com.esri.arcgis.geodatabase package. However, I can't find the IRouteLocator2 equivalent or any clear alternative to perform route-measure based locating or identifying.

Also, I noticed that the Locator class in the Enterprise SDK has a getCategory() method which can return "Route Event", which suggests that linear referencing is still supported in some form.

Can anyone clarify:

  • What is the recommended approach to perform linear referencing (e.g. locate geometry by route and measure) using ArcGIS Enterprise SDK?

  • Is there a replacement for IRouteLocator2, or a new pattern to achieve the same functionality?

Any guidance or documentation references would be greatly appreciated!

Thanks in advance.

Tags (2)
0 Kudos
1 Reply
JeffJacobson
Frequent Contributor

There is a discussion about this in a different thread with some alternative interfaces.

My agency has an SOE that depends on these interfaces and opened a support case with Esri about it. They plan to reintroduce these interfaces in some future version at some undetermined point in time.

ENH-000130183: "Add the ArcObjects Location library to the ArcGIS Enterprise SDK"

Use Case

One use case: the user has existing SOEs created for ArcMap. [It's actually the ArcGIS Server ArcObjects SDK, but they're referring to the fact that that these are map services that are published with ArcMap.] They would like to migrate to the Enterprise SDK to use them with Pro services. They use geometric networks and linear referencing to determine locations and relevant attribute information in the soe, so it will not be easy to migrate without this library. Specifically: IRouteLocator2, IRouteLocation, IRouteMeasurePointLocation, IRouteLocation, IRouteMeasureLineLocation, IEnumRouteIdentifyResult, and IRouteMeasurePointLocation.

We are also investigating some non-Esri alternatives.

  • NetTopologySuite - NetTopologySuite is .NET port of the Java library, JTS.
    • We got this working but encountered an issue (not sure if its a bug or if we were somehow using it wrong) that prevented us from using it: if you specify a begin and end measure on a polyline, and those measures span two different lines within the polyline, the output segment should also be a polyline, but instead the gap between the lines is incorrectly connected. I do not know if JTS has the same issue.
  • GDAL ogrlineref - The open-source GDAL is installed when ArcGIS software is installed. We haven't had time to do must investigating of this option. At the time we looked into ogrlineref, the Python implementation of GDAL didn't expose ogrlineref.
  • PostGIS - PostgreSQL has built-in support for linear referencing via PostGIS. Migrating our LRS data from SQL Server to PostgreSQL / PostGIS would allow LRS functions to be carried out in database queries. We haven't tested this option at all, so we don't know if the LRS functions work the way we think they will. (I.e., it's possible we could encounter the same issue that we did with NetTopologySuite.)
0 Kudos