|
POST
|
After you create a new Route layer, you have to first load locations (stops) before you can solve the Route. Essentially, you have to tell the Route layer what points you're creating a route for. So, you use the Load Locations tool (or Add Locations if you're using ArcToolbox or writing a python script or making a model). When you load locations, you can do something called field mapping. This determines the relationship between fields in the input data (your people and parks) and the class in the Route layer you're loading (Stops). The Stops class has a field called Name, and you can indicate that the field "ParkName" in your parks input should be transferred to the Name field in Stops. To read more about field mapping and the Load Locations tool, check out this page: http://resources.arcgis.com/en/help/main/10.2/index.html#//00470000003t000000. You can use field mapping to produce the behavior you're looking for (to create a separate route between individual pairs of stops). When you load your people and your parks into the Stops class, you can assign each person and park to a different route using the RouteName field. Stops with the same RouteName will have a route generated between them. If your Stops class contains stops with 10 different RouteNames, 10 individual routes will be created in the results. So, to do what you're trying to do, you should give each person-park pair a unique ID that will be used as the RouteName: RouteName, Participant, Park Route_A, 1, X Route_B, 2, Y Route_C, 3, Z Route_D, 4, Y This is why you might have to load multiple copies of some parks. If multiple people use the same park, you'll need a copy of that park for each person who used it.
... View more
02-27-2014
01:52 PM
|
0
|
0
|
2235
|
|
POST
|
Yes! To do this, you need to use field mapping when you do Load Locations (or Add Locations from python). You need to map your input data's break value field to the Breaks_[ImpedanceAttribute] field in your Service Area Facilities layer. Each one will get its own break value that way. The break values option on the layer properties will be used only if a facility doesn't have its own in the table. In other words, the values in the table override the default value on the layer properties, which is just what you want. You can read more about field mapping here: http://resources.arcgis.com/en/help/main/10.2/index.html#//00470000003t000000
... View more
02-18-2014
06:34 AM
|
0
|
0
|
940
|
|
POST
|
Oh, now I understand your question. You want a way to relate the input Incidents or Facilities back to the original data you loaded in. Got it. When you're loading your data as Incidents or Facilities using Load Locations, you can use the Field Mapping controls to retain some of the fields from the original data. You could map a unique ID field in your input data to the Name field in Incidents or Facilities. If you want to retain several fields from your input data, you can use the Add Field To Analysis Layer tool to create new fields in Incidents and Facilities. Then, after creating those fields, you can run Load Locations and use the Field Mapping control to map the correct fields from the input data. More information about field mapping can be found here: http://resources.arcgis.com/en/help/main/10.2/index.html#//00470000003t000000
... View more
02-14-2014
06:23 AM
|
0
|
0
|
1473
|
|
POST
|
Hi. You can use the Route solver. You can configure it to solve multiple routes, one for each person-park pair. To do this, you need to use field mapping when you're loading locations into the Route layer. Each person-park pair should have a unique ID, and you should map this unique ID to the Route layer's RouteID field. You might have to load multiple copies of the same park because multiple people use the same park.
... View more
02-14-2014
06:18 AM
|
0
|
0
|
2235
|
|
POST
|
Hi Marco. In the output Routes class of Closest Facility, the FacilityID field can be joined to the ObjectID field in Facilities, and the IncidentID field can be joined to the ObjectID field of Incidents.
... View more
02-13-2014
06:27 AM
|
0
|
0
|
1473
|
|
POST
|
A good first step would be to run through the Network Analyst tutorials, available here: http://resources.arcgis.com/en/help/main/10.2/index.html#//00470000005r000000. They will show you how to incorporate your StreetMaps Premium data and set up a Route or other analysis. Post again if you have further questions.
... View more
02-03-2014
06:12 AM
|
0
|
0
|
876
|
|
POST
|
Hi Andreas. Yes, it looks like that executable just does some stuff you could write yourself in python without too much trouble. You just have to grab the output OD Lines, run a search cursor, and print each row to the CSV file using python's simple csv module. Or, you can just continue using that executable. I think it would still work with multiprocessing. Also, before you continue, please note that multiprocessing isn't going to help you much if your machine has only 2 cores or something, so think about that before spending a lot of time on this. Here's a little outline script showing how you can set up multiprocessing. Let me know if this isn't clear or you need more detail. import multiprocessing
import csv
import arcpy
def CalculateOD(stuffPassed):
'''Calculate the OD matrix and write the results to a CSV'''
## Generate the input layer. You can read in a saved layer template
## add add the appropriate origins and destinations for this chunk
## Solve the layer
## Call the external Save-to-CSV code or write your own code
## Return the path to the CSV
# ---- Main code ----
def main():
## Do whatever you need to prepare your analysis
ODChunks = []
## Fill your list of OD chunks somehow
# Pass this info as inputs to the multiprocessing function.
stuffToPass = []
for chunk in ODChunks:
if chunk:
idx = ODChunks.index(chunk)
# I'm passing the chunk index because you can use that to name the output file
stuffToPass.append([chunk, idx, OTHERVARIABLES])
# Do the multiprocessing. It could return the paths to the output csvs if you want.
pool = multiprocessing.Pool()
OutCSVs = pool.map(CalculateOD, stuffToPass)
pool.close()
pool.join()
# Combine the output csvs
for CSVFile in OutCSVs:
## Open each CSV using python's csv module
## The first line is probably the field headers, so discard that after the first time
## Dump the rows out into one giant table.
if __name__ == '__main__':
main() Note: You can't execute a multiprocessed code like this from within a python IDE. You have to run it from a command line. Also, you have to have the if __name__ == '__main__': syntax with the main() function.
... View more
01-27-2014
10:46 AM
|
0
|
0
|
1467
|
|
POST
|
It sounds like the Closest Facility tool might work for you. To better understand how to use Network Analyst tools, including Closest Facility, please look through the tutorials here: http://resources.arcgis.com/en/help/main/10.2/index.html#//00470000005r000000.
... View more
01-27-2014
06:19 AM
|
0
|
0
|
608
|
|
POST
|
Hi Andreas. There are a couple of ways to speed up lengthy network calculations: 1) Install the 64-bit Background Geoprocessing product. This way, when you run ArcToolbox tools in Desktop, if you have background geoprocessing enabled (in Geoprocessing->Options), the tool will run in 64-bit mode, which speeds things up quite a bit. Note that you have to be running the ArcToolbox version of Solve instead of clicking the little Solve button on the Network Analyst toolbar. You can also run python script tools using 64-bit background GP by simply calling the 64-bit version of python. The documentation explains it in more detail: http://resources.arcgis.com/en/help/main/10.2/index.html#//002100000040000000. 2) You can use python�??s multiprocessing module to run several analyses in parallel. This is extremely helpful for a problem like yours that can be broken up into chunks. I have some examples I can share if you�??re interested. Setting up the multiprocessing is simple in principle, but it doesn't always play well with ArcGIS, so it�??s a bit tricky. You can't write to the same output geodatabase from multiple processes at once (it's a schema lock issue), and you can't share the same NA layer across processes. It works best to split up the problem into chunks first, and then your multiprocessed function can create a new layer, add the locations, solve it, and write the results. Then, back in your main script, do something to combine the results in the way you want. Hope this helps.
... View more
01-27-2014
06:16 AM
|
0
|
0
|
1467
|
|
POST
|
We didn't make any changes to the network dataset structure or data model between 10.1 and 10.2, so a version 10.1 dataset is fully up to date for 10.2.
... View more
01-14-2014
06:15 AM
|
0
|
0
|
922
|
|
POST
|
Hi Michael. You don't need to use python in order to use the ArcGIS Online Service Area tool. Start here: http://resources.arcgis.com/en/help/main/10.2/index.html#//0047000001v5000000 The doc will guide you through how to connect to the services and how to run them.
... View more
01-14-2014
06:08 AM
|
0
|
0
|
1758
|
|
POST
|
Open up your Route layer properties, go to the Analysis Settings tab, and make sure "Reorder Stops To Find Optimal Route" is unchecked.
... View more
01-10-2014
06:29 AM
|
0
|
0
|
683
|
|
POST
|
Yes, the resulting direction WOULD have a line saying "Arrive at Stop X", so it would get kind of messy. You could probably post-process that out automatically. The turns are included regardless. If you have to turn from one road to another in order to get from A to B, it will tell you "Drive X miles along Road P." "Make a left at Q street." "Drive Y miles along Road Q." "Arrive at Stop B".
... View more
01-09-2014
08:33 AM
|
0
|
0
|
2241
|
|
POST
|
Sorry, I meant that it might be easier to add your LR route vertices to the Find Route tool than it would be to set up a network dataset from your own data with good quality directions. It takes some effort to get Directions set up properly from your own data. The reason I suggested grabbing the LR route vertices and using those as stops is that they are probably close enough together so that the Network Analyst Route solver would produce the same result as the original line you started with (rather than some different, optimized route). You can convert the LR lines to a point feature class of vertices using the Feature Vertices to Points tool (http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000003p000000) and use those points as inputs to NA Route. If you are comfortable with python, you could automate the whole thing. I do not know of any other tools that would allow you to generate directions from a linear referenced route. The directions engine works specifically with the Network Analyst tools and relies upon the information contained in a network dataset, which has no connection to the linear referencing results.
... View more
01-09-2014
07:54 AM
|
0
|
0
|
2241
|
|
POST
|
No, the Network Analyst tools all require points as input. Perhaps you could pull out all the vertices from your linear referenced routes and use those as input stops for an NA Route. Solve the route and generate directions. If you create your own simple network dataset, you would have to set up Directions in the network dataset manually. It might be easier to continue using the Find Route tool.
... View more
01-09-2014
07:13 AM
|
0
|
0
|
2241
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 3 weeks ago | |
| 1 | 3 weeks ago | |
| 1 | 06-12-2026 01:53 PM | |
| 1 | 04-21-2026 08:39 AM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|