AnsweredAssumed Answered

Retrieving traversed source edge attributes in GP service

Question asked by duncan.fetner_Zayo on Nov 5, 2018

Hey GeoNet!

 

I've been struggling to find the best way to retrieve attributes from edges traversed in routes generated by a Find Routes GP service nested within another GP service. Currently, I'm returning edges in my outputs and storing the SourceOIDs as keys in a dictionary with empty values, then populating the values with the necessary attributes by referencing the OBJECTID field in a feature service of the source edges. This method works fine, but it requires that I republish a new table service each time I update the network dataset (may be unnecessary, but I'm still wrapping my head around server-side concepts so that's why I'm here). I'm updating the ND frequently enough that this has become cumbersome and I'm hoping there's a better way.

 

Some details:

  • The ND lives in a file geodatabase in a registered folder on a separate machine and is updated every 12 to 24 hours
  • I need to pull the geometry token from the traversed edges to generate the final output of the larger GP service; the output from Find Routes is not sufficient for what I need to return
  • The nature of the underlying data requires a total recreation with each ND update; since I'm not simply appending new edges to an existing ND and rebuilding, so there's no consistent OBJECTID sequence in the edges that I could potentially utilize 

 

Some questions/thoughts I've had:

  • I'd like to entirely eliminate having to use a separate feature service to pull shapes/attributes; since the data is in a registered folder, could I get these values with a SearchCursor?
    • If so, what is the proper path structure to use as a reference to the source edges?
  • If I replaced the Find Routes service with a Copy Traversed Source Features GP service to generate the routes, would it provide more flexible alternatives to get the outputs I'm looking for?
    • Related thought: would returning the output route layer in the Find Routes service and using that as an input to a separate Copy Traversed Source Features service be better practice?

 

I've gotten to the point where I'm just spinning my wheels, so I hope that someone else has been faced with this issue and can provide some more insight.

 

Thank you!

Outcomes