Specify network location for route stop using business ID instead of ObjectID

778
1
04-27-2015 12:03 PM
Status: Open
MichaelDorais
New Contributor III
Currently using Network Analyst, to specify that a stop must be on a specific network element, its network location must be identified using the SourceID, SourceOID, PosAlong, and SideOfEdge.  The SourceOID is the ObjectID of the corresponding feature in the feature class participating the network dataset.  Because the ObjecdtID is automatically generated and cannot be set to a specific value when a feature is inserted, its value may not be known in certain contexts, but another business ID maybe well known.  We should be able to specify the business ID instead of the object ID to identify the network element.
I am specifically interested in the context of using the ArcGIS Runtime OnlineRouteTask that hits ArcGIS Server’s REST API.  However there are other cases in which this would apply as well.
 
For Reference:
This use of SourceID, SourceOID, PosAlong, and SideOfEdge may be easily missed in the Esri documentation, but here are a few links that touch on it:
https://developers.arcgis.com/net/desktop/api-reference/
https://geonet.esri.com/thread/82305
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//003600000133000000
http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//0036000000zp000000
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//004800000005000000.htm
 
1 Comment
MelindaMorang

In ArcMap or ArcGIS Pro, you can use the search_query parameter in the Add Locations or Calculate Location tool to force the points to locate on an edge with a specific ID from some field.

Add Locations—ArcGIS Pro | ArcGIS Desktop 

I don't think the REST API supports a search query, but if you're pre-calculating your location fields anyway, you could probably just do it this way.