|
POST
|
I believe the out-of-the-box ArcGIS tool for this is Euclidean Allocation.
... View more
11-17-2015
11:41 AM
|
0
|
3
|
2186
|
|
POST
|
Try saving as a .tif, which doesn't have the same naming restrictions. That way, you may be able to determine whether it's a problem with your file name (doesn't look like it), in-line variable substitution (maybe?), or something else entirely (probably?).
... View more
11-17-2015
10:17 AM
|
1
|
0
|
1874
|
|
POST
|
I would start by identifying ridgelines and sampling those pixels as potential observation points. You can get at ridgelines by finding pixels where flow accumulation = 0.
... View more
11-16-2015
01:24 PM
|
1
|
0
|
5280
|
|
POST
|
You must (?) enclose your field names in brackets (as you did long before) in the label expression FindLabel function :
def FindLabel ( [stand_code], [Avg_TPA_Pine], [Avg_TPA_Cyp], [Avg_TPA_Hdwd] ):
... View more
11-16-2015
10:55 AM
|
0
|
0
|
1272
|
|
POST
|
'in_memory' isn't a table, it's a workspace. The table output from Create Table is 'in_memory\submittedLongLat%time%', which is the desired input for the next tools.
... View more
11-12-2015
03:55 PM
|
1
|
0
|
3329
|
|
POST
|
Have you tried stretching it all out linearly, not using precondtions? So, Create Table, then Calculate Field, then Calculate Field, and finally Make XY Event Layer. I use Python rather than ModelBuilder - perhaps the linear model is exactly equivalent to using preconditions, but I've never had much luck getting them to work as I want. I don't think 'in_memory' is the culprit. As long as you're not running out of memory, it should function more or less like a FGDB feature class. Does it work if you save the file to disk?
... View more
11-12-2015
01:12 PM
|
0
|
0
|
3329
|
|
POST
|
That is how you would set the workspace environment. If you just want to get the workspace environment, switch the equation: >>> path = arcpy.env.workspace
>>> print path # workspace location Some other peripheral ideas would be to reference the script location: >>> import sys
>>> print sys.argv[0] # script location ... or the current mxd location: >>> print arcpy.mapping.MapDocument("CURRENT").filePath # current mxd location
... View more
11-12-2015
08:59 AM
|
1
|
8
|
6444
|
|
POST
|
My understanding of list comprehensions (which is limited) is that it becomes a list comprehension when it meets the following pattern: [return elements of some sort for something in some iterable if some condition] # all in an outgoing list I'm not sure at which point Python decides that this is a list comprehension, or if that's even important. List comprehensions are a convenient way to build lists (although I find them confusing and really don't use them at all).
... View more
11-06-2015
02:43 PM
|
1
|
1
|
3760
|
|
POST
|
I'm assuming Join is accomplishing the same thing, is that correct? Join doesn't do anything except cycle through a list, interleaving it with the thing (like a space). It's really the list comprehension that does the magic in creating the list. How does Python know to end a loop? I'm probably glazing over some subtleties, but you can think of Python "for" loops as "for each" loops. They cycle through through all the things, then quit.
... View more
11-06-2015
02:15 PM
|
1
|
4
|
3760
|
|
POST
|
Dan's one-line example actually has a whole bunch of things going on. fld = " ".join([str(i) for i in [a,b,c,d,e] if i]) ... can be rewritten: myList = []
for i in [a,b,c,d,e]:
if i:
myList.append(str(i))
" ".join(myList) Not sure if that helps or not, just a different way to read it.
... View more
11-06-2015
01:58 PM
|
2
|
7
|
10143
|
|
POST
|
I can't find your nothing post in your prolific blog. How does IS differ from EXISTS?
... View more
11-06-2015
01:47 PM
|
0
|
1
|
10145
|
|
POST
|
The operative part is if i In short: if i: # checks if i 'exists'
do something
... View more
11-06-2015
01:21 PM
|
0
|
13
|
10145
|
|
POST
|
Ah, I figured line 602 was your importToolbox script line. Nevermind. Best of luck.
... View more
11-06-2015
12:59 PM
|
0
|
0
|
3506
|
|
POST
|
Neil Ayres, the code does exactly what you suggest, renaming a known projection, essentially creating a "custom" projection. The equivalent using Define would be to create a custom projection beforehand and define to that. Six one way, half dozen the other (although actual performance may differ).
... View more
11-06-2015
11:20 AM
|
0
|
9
|
4511
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-25-2015 01:51 PM | |
| 1 | 08-30-2013 02:22 PM | |
| 1 | 04-12-2011 11:19 AM | |
| 1 | 09-17-2021 09:43 AM | |
| 1 | 04-04-2012 12:05 PM |
| Online Status |
Offline
|
| Date Last Visited |
07-15-2023
12:11 AM
|