|
POST
|
Use forward slashes (/), double backslashes (\\), or raw strings (r"...") in your file paths.
... View more
05-28-2012
11:13 AM
|
0
|
0
|
746
|
|
POST
|
Outside of your function, you're in ArcGIS world - so you correctly use "!DOC_NO!" to reference the field, which passes each value, then "docno", to the function one at a time. Inside the function, you're in Python world, so you use the variable "docno". def myfunction(docno) :
if len(docno)== 0 :
return ""
else:
return "V:\Eng\Land Management\Easements\Scanned Documents\" + docno + ".tif"
edit: also, check your quotes after the first return - you've got two single quotes, then a double quote.
... View more
05-25-2012
12:24 PM
|
0
|
0
|
1061
|
|
POST
|
Why not use an insert cursor to add the polygon and attributes all at once?
... View more
05-25-2012
12:18 PM
|
0
|
0
|
922
|
|
POST
|
Isn't it "TabulateArea" in arcpy? TabulateArea (in_zone_data, zone_field, in_class_data, class_field, out_table, {processing_cell_size})
... View more
05-18-2012
07:03 AM
|
0
|
0
|
673
|
|
POST
|
Buffer, then probably (depending on what you want to do) Identity or Union.
... View more
05-14-2012
12:58 PM
|
0
|
0
|
5340
|
|
POST
|
expression = "ACCTEXT = '"+p+"'" This probably isn't the problem, but is the above 'p' supposed to be 'pu'? I assume the problem is either there is no data frame called "Main Map" or there is no layer called "TAXPARCELS". Which line is throwing the error?
... View more
05-09-2012
12:41 PM
|
0
|
0
|
1439
|
|
POST
|
I keep getting the following error IndexError: list index out of range. Not sure what I am doing wrong. Might sound silly, but the only thing I can think of is that you haven't entered a value for the parameter, sys.argv[1]. Have you (ie. when you run the script, do you indicate which folder you want?)? Does this work? It should. import arcpy, sys
arcpy.AddMessage(sys.argv[1])
print(sys.argv[1])
... View more
05-08-2012
12:07 PM
|
0
|
0
|
3263
|
|
POST
|
Did it say something like "myraster.tif does not exist or cannot be found"? I'm not sure why but after one or two times, I have to restart Arc to get it to do more.
... View more
05-08-2012
06:57 AM
|
0
|
0
|
1465
|
|
POST
|
I was going to reply to tell you to use the rotate button, but was shocked to find that it doesn't do anything. Apparently, this is a "known issue" and has been since 2006 - so don't hold your breath on a fix. Seems like fairly basic functionality, but who knows. edit: if you need to rip through a folder of images, you can use the PIL Python library (example). Basically just open, rotate, save.
... View more
05-07-2012
02:26 PM
|
0
|
0
|
891
|
|
POST
|
Try this: Con(IsNull("myraster"),0,"myraster") This works in the Raster Calculator, for v10, with ESRI GRIDs. Not sure if it's the same for v9.3, or for other formats.
... View more
05-07-2012
01:29 PM
|
0
|
0
|
1465
|
|
POST
|
Haha, now that I look at it "*.14.tif" wouldn't work even if it used wildcards - there's an extra '.' So, touché.
... View more
05-07-2012
12:38 PM
|
0
|
0
|
508
|
|
POST
|
Or, just to be lazy: if not filename.endswith("*.14.tif"):
... View more
05-07-2012
11:55 AM
|
0
|
0
|
2471
|
|
POST
|
Jook, you need the second list (inRasters = []) so that you have an empty place to put the rasters ending in "14.tif". "rasterFiles = arcpy.ListRasters()" lists all of the rasters, then put the "14.tif" files into "inRasters". Then, calculate the mean of all of the rasters in "inRasters". The way you have modified the code will produce the original list of all rasters, plus any file in "14.tif", so you'll have two copies of each "14.tif". Finally, just to be clear you are not excluding the files ending in "14.tif", you are only using them (ie. you are excluding anything not ending in (14.tif")
... View more
05-07-2012
08:49 AM
|
0
|
0
|
2471
|
|
POST
|
"EndIf" needs a space ---------> "end if" Also, IsNull is a function, and requires ()'s around the field name.
... View more
05-04-2012
08:57 AM
|
2
|
0
|
6171
|
|
POST
|
You're missing the very last parentheses...parenthesis... this ---> )
... View more
05-04-2012
07:50 AM
|
0
|
0
|
1077
|
| Title | Kudos | Posted |
|---|---|---|
| 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 | |
| 2 | 07-16-2020 11:31 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-15-2023
12:11 AM
|