|
POST
|
input = point feature class
input_fl = arcpy.MakeFeatureLayer_management(input, "input_fl")
#Iterate through to extract values to points based on date
arcpy.env.workspace = #geodatabase with the rasters
fl = arcpy.ListRasters()
dict = {}
for feature in fl:
j = feature[-5:-1] + feature[-1]#returns the julian date
with arcpy.da.SearchCursor(input, ["julian", "OBJECTID"]) as cursor:
for row in cursor:
counter = 1
if row[0] == int(j):
query = "OBJECTID = " + str(row[1])
selection = arcpy.SelectLayerByAttribute_management("input_fl", "NEW_SELECTION", query)
temp = #temporary output string
table = arcpy.sa.ExtractValuesToPoints(selection, r'string for geodatabase' + feature, r"ouput geodatabase" + feature + "_testtable"+str(counter))
counter += 1
with arcpy.da.SearchCursor(table, ['ID', 'RASTERVALU']) as cursor2:
for row2 in cursor2:
ID = row2[0]
value = row2[1]
dict.update({ID : value})
arcpy.Delete_management(table)
else:
print('not equal' + str(row[0]))
with arcpy.da.UpdateCursor(input, ['ID', "Value column"]) as cursor:
for row in cursor:
row[1] = dict[row[0]]
cursor.updateRow(row) Hi, Something along these lines by using a selection on each?
... View more
02-04-2020
11:23 AM
|
0
|
1
|
1789
|
|
POST
|
Hi Karen, of course. On the tool window at the top left will be a list of rasters in your table of contents. Double click on you DEM listed here. The 'expression' box should now show this raster. Then type '* 0.01' (Without the single quotes)
... View more
02-03-2020
03:18 PM
|
0
|
1
|
2751
|
|
POST
|
I think I get it. Just one bus? Where do you want the street to take on the bus stop attribute, and where do you want the next street to take on attribution from the next stop on the route? This will be quite easy to achieve but a picture of what you want would paint a thousand words at it were.
... View more
02-03-2020
02:26 PM
|
0
|
0
|
1576
|
|
POST
|
Ah ok, I think you run an OD cost matrix, that will do it for every point to every other point, but just get rid of the unwanted records in the table afterwards.
... View more
02-02-2020
01:44 PM
|
0
|
0
|
1446
|
|
POST
|
It's coming back with those values as it's currently equating metres on the ground with cm, making it appear like Mordor. You need to change the raster units to metres using raster calculator or you might be able to specify a z factor of 0.01
... View more
02-02-2020
01:07 PM
|
0
|
5
|
2751
|
|
POST
|
Do you have a Network Dataset? Searching for 'Route Analysis' should yield enough info.
... View more
02-02-2020
12:56 PM
|
0
|
2
|
1446
|
|
POST
|
Use a tool called 'Raster Calculator' and multiply your current values by 0.01 https://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-too…
... View more
02-02-2020
12:13 PM
|
0
|
0
|
2751
|
|
POST
|
Perhaps storing this data in arcgis online would be the easiest and best solution. A list of CIF schools and their locations would be all that's needed, then attribution could be added such as number of pupils, which teams each school has etc. Sounds like a great idea, good luck with it.
... View more
02-02-2020
07:49 AM
|
0
|
0
|
530
|
|
POST
|
Hi, I've read your question multiple times and can't understand it. What is the bus stop position?
... View more
02-02-2020
07:42 AM
|
0
|
2
|
1576
|
|
POST
|
02-01-2020
01:41 PM
|
2
|
1
|
1718
|
|
POST
|
I'd also trying loading them into arcmap then right click, data, export and save as .tif you can also supply a spatial ref
... View more
02-01-2020
01:39 PM
|
0
|
0
|
4092
|
|
POST
|
I'm going to let you suggest the code then we can look at it.
... View more
02-01-2020
01:31 PM
|
2
|
4
|
1718
|
|
POST
|
Maybe it's doing integer division. I'll amend the code now
... View more
02-01-2020
12:50 PM
|
2
|
7
|
4348
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-13-2025 01:08 PM | |
| 1 | 09-25-2025 03:19 PM | |
| 1 | 09-24-2025 02:35 PM | |
| 1 | 09-17-2025 02:42 PM | |
| 1 | 09-10-2025 02:35 PM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|