Comments (3)
Hmm, I think I know what you're asking for: Your original Origins and Destinations files have some field for an ID or unique code or whatever. You want to transfer this value through to the final output. Is that right?
It's not possible to alter the OriginOID and DestinationOID fields (well, I guess you could in post-processing if you wanted to). But what you can do is pass through the original field values in addition to OriginOID and DestinationOID. You'll need to include your fields in the inputs when calling the load() method, and then once the OD Cost Matrix is solved, you'll need to join the output Origins and Destinations to the Lines to transfer over the values of that field.
This section in the arcpy.nax documentation explains how to include custom fields when loading inputs. You'll want to apply this information here: https://github.com/Esri/large-network-analysis-tools/blob/master/parallel_odcm.py#L312-L356. There's already some fields getting added and mapped, so it should be a straightforward addition to what's already happening.
For doing the join on the results, the code is actually already doing a similar join in the case where the network data source is a service. It's transferring the ObjectIDs, but the same idea would apply to any other field. You can see that here: https://github.com/Esri/large-network-analysis-tools/blob/master/parallel_odcm.py#L493-L524. The key thing to understand is that the fields in the input Origins and Destinations get transferred to the output Origins and Destinations. The OriginOID field in the output Lines refers to the ObjectID field in the output Origins, and the DestinationOID field in Lines refers to the ObjectID field in the output Destinations. So you'll want to use these fields to make joins and transfer any other fields you want over to Lines.
(I'm not sure what kind of output you want, and the steps may differ a little for feature class, CSV, or Arrow.)
from large-network-analysis-tools.
Did this satisfactorily answer your question? If so, please close the issue. (But it's okay if you need some time to think about it and play with it.)
from large-network-analysis-tools.
Thank you; it helps a lot.
from large-network-analysis-tools.
Related Issues (11)
- Modifying for Service Area HOT 2
- Time and date HOT 4
- Curb approach HOT 7
- Create input parameters to designate unique ID fields for the input origins and destinations HOT 1
- Known pairs issues/questions HOT 10
- Solve Large Analysis with known OD Pairs tool fails HOT 3
- Enhance "Solve Large Analysis With Known OD Pairs" tool to do many-to-many problems and accept a table of OD pairs HOT 10
- Is it possible to set the Calculate Network Locations to parallel processing as well? HOT 7
- Empty geometries in Line-FeatureClass result of SolveLargeODCostMatrix HOT 2
- Write logger messages from subprocess to GP UI HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from large-network-analysis-tools.