POST
|
I have generated edge and used that tool. I will look into your suggestions. Spatial select will not work for me since it may select the to and from route road segment. Essentially doubling the distance. I will try the 0 and 1 approach. Fortunately, I don't have any orders on an endpoint.
... View more
05-16-2018
01:52 PM
|
0
|
1
|
1357
|
POST
|
Distance traveled for only on road segments that have orders. Not counting the road segment again if need to traverse it again as part the route to get to next order.
... View more
05-16-2018
12:01 PM
|
0
|
3
|
1357
|
POST
|
I have looked at those also and they will not produce what I am looking for.
... View more
05-16-2018
11:50 AM
|
0
|
5
|
1357
|
POST
|
Yes, distance from one order to another, but only the actual serviced road segment. I see the Orders cumulative distance but not the individual orders distance.
... View more
05-16-2018
08:59 AM
|
0
|
7
|
1357
|
POST
|
After my analysis, I can obtain the routes' total distance traveled but I want to retrieve the actual order distance.
... View more
05-15-2018
03:44 PM
|
0
|
9
|
1475
|
POST
|
I believe you are referring to my following example of a dictionary to a list. In my case, I would read the csv file as a dictionary not hardcoded in the script. my_dict = {'A1':405,'A2':145} print str(list_items) + " " + " These are the keys and values" print str(list_keys) + " " + " These are the keys" print str(list_values) + " " + " These are values" [('A1', 405), ('A2', 145)] These are the keys and values ['A1', 'A2'] These are the keys [405, 145] These are values
... View more
05-02-2018
01:19 PM
|
0
|
1
|
1426
|
POST
|
the polygon feature is not empty, I want to add table info from the csv file.
... View more
05-02-2018
12:58 PM
|
0
|
0
|
1426
|
POST
|
Thank you for the advice, I will work this out with your suggestions.
... View more
05-02-2018
08:03 AM
|
0
|
0
|
1426
|
POST
|
Creating a dictionary form the csv is straight forward but I still have the issue of passing the values to the cursor. import csv,os
updateCursor = arcpy.da.UpdateCursor(r'sample.shp', ["Name", "OrderCount","Time","Miles"])
with open(r'test.csv') as csvfile:
reader = csv.DictReader(csvfile, delimiter = ",")
for row in reader:
updateCursor.updateRow(row)
... View more
05-01-2018
03:29 PM
|
0
|
6
|
2677
|
POST
|
Thanks for the advice. I did not realize cursors as gone thru the following iterations: arcpy.UpdateCursor arcpy.da.UpdateCursor UpdateCursor I actually want to read a separate excel csv file and write the data (UpdateCursor) to same named shapefile fields.
... View more
05-01-2018
07:44 AM
|
0
|
0
|
2677
|
POST
|
How do I modify my syntax to properly read an csv file and write the contents to a shapefile using an update cursor ? # Read csv file & write to shapefile via update cursor
import csv,os
updateCursor = arcpy.da.UpdateCursor(r'sample.shp', ["Name", "OrderCount","Time","Miles"])
with open(r'CsvToShape.csv','rb') as f:
reader = csv.reader(f)
for row in reader:
route = row[0]
order = row[1]
time = row[2]
mile = row[3]
for row in updateCursor:
row.setValue(route = Name)
## row[1]= order
## row[2] = time
## row[3] = mile
updateCursor.updateRow(row)
... View more
05-01-2018
07:23 AM
|
1
|
22
|
5994
|
POST
|
Thank you, it worked. I also set the symbology to an offset so both sides of the road is showing the travel route path with arrows. Now, I want to show route segments that do not have orders as a different grey color for example, denoting that it isn't an actual order segment.
... View more
04-19-2018
01:22 PM
|
0
|
1
|
444
|
POST
|
Correct, it is a single feature class that I want to be split into each road segment to display the directionality of the route. This isn't the case, when I split the route it inherits the directionality of digitized lines.
... View more
04-19-2018
11:44 AM
|
0
|
3
|
444
|
Title | Kudos | Posted |
---|---|---|
1 | 11-03-2016 06:52 AM | |
1 | 05-10-2016 10:27 AM | |
1 | 02-06-2017 01:22 PM | |
1 | 05-01-2018 07:23 AM | |
1 | 03-03-2017 02:46 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|