|
POST
|
Have you checked to make sure the files and folders exist, have valid names etc?
... View more
04-30-2012
01:48 PM
|
0
|
0
|
2832
|
|
POST
|
Thanks for you help Mathew. I am trying to find out which feature classes in a directory with 200+ folders has drillholes. I tried the code you gave me but this was what was returned: General function failure [ballinp_1] Too few parameters. Expected 1. That would probably be because there was no except statement added at the end. A simpler way to go about it might be to make a temp feature layer from each fc and do a select by attribute to see if get count returns anything.
... View more
04-30-2012
11:31 AM
|
0
|
0
|
1843
|
|
POST
|
Not quite sure what you are asking. What about the attribute 'drillhole' in the 'Label' field do you want to know? The OID? Number of occurrences? Here's an example of identifying the row and then you can do what you want from there. field = "Label"
value = "drillhole"
for fc in fccl:
try:
s_curs = arcpy.SearchCursor(fc,"%s = '%s'" % (field,value),"","Label")
for row in s_curs:
# do something as each row should be a drillhole
... View more
04-30-2012
09:54 AM
|
0
|
0
|
1843
|
|
POST
|
Arc2Google works perfectly for me. http://www.husseinnasser.com/2011/01/arc2google-for-arcgis-10.html
... View more
04-26-2012
12:36 PM
|
0
|
0
|
2553
|
|
POST
|
First, when posting code enclose in [/ CODE] blocks to preserve formatting. Second, it looks like your CO field is a string with numeric values, not a numeric field, so you need to enclose the values in quotes as you do your other strings.
... View more
04-26-2012
10:42 AM
|
0
|
0
|
2089
|
|
POST
|
To give you a ballpark, when I join a 900k row feature class to 900k row table with 20 fields it takes about an hour on a pretty beefy workstation.
... View more
04-25-2012
02:47 PM
|
0
|
0
|
1596
|
|
POST
|
I agree the documentation could be more clear. It does state, or rather omits, that reset() is not a supported method here, under "The Cursor Object". http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002z0000001q000000
... View more
04-25-2012
05:31 AM
|
0
|
0
|
1632
|
|
POST
|
Rewrite it using arcpy instead of arcgisscripting would be my suggestion. Have you tried creating the gp without forcing to 9.3? gp = arcgisscripting.create() A while ago a post here by Esri stated it would still be available in 10.1, so not sure what the issue is as I haven't dabble in 10.1 myself yet. http://forums.arcgis.com/threads/44713-Confirm-deprecation-of-arcgisscripting-at-10.1
... View more
04-24-2012
08:17 AM
|
0
|
0
|
3335
|
|
POST
|
Did it work in 10? I'll work with the assumption that it didn't since it has some incorrect formatting even for 10. Try this
shapeField = desc.shapeFieldName
sRow = arcpy.SearchCursor(fc)
for row in sRow:
pt = row.getValue(shapeField).getPart(0)
... View more
04-24-2012
07:52 AM
|
0
|
0
|
3335
|
|
POST
|
Oh thats a typo rows = arcpy.UpdateCursor(areaTab1) cols = arcpy.ListFields(areaTab1) for row in rows: for col in cols: if row.getValue(col.name) == 0: row.setValue(col.name, 9999) rows.updateRow(row)
... View more
04-19-2012
12:16 PM
|
0
|
0
|
3970
|
|
POST
|
The output would be a new feature class. If the tool output has the same path/name as an existing feature class, that original feature class will first be deleted, then the new one created. In terms of locks, if the original feature class is locked somewhere the process will fail.
... View more
04-19-2012
11:31 AM
|
0
|
0
|
935
|
|
POST
|
Alternatively, for your code you're looping through the rows twice, not the columns at all. import arcpy, os
from arcpy.sa import *
from arcpy import env
arcpy.CheckOutExtension("Spatial")
arcpy.env.overwriteOutput = True
areaTab1 = r"X:\DATA\ROW_SP_areaTab"
rows = arcpy.UpdateCursor(areaTab1)
cols = arcpy.ListFields(areaTab1)
for row in rows:
for col in cols:
if row.getValue(col.name) == 0:
row.setValue(col.name, 9999)
row.updateRow(row) edit: changed some "col" to "col.name" You'll want to indent under the field list loop as well. for row in rows:
for col in cols:
if row.getValue(col.name) == 0:
row.setValue(col.name, 9999)
row.updateRow(row
... View more
04-19-2012
11:27 AM
|
0
|
0
|
3970
|
|
POST
|
Not sure about ArcHydro in particular, but even for heavy ArcGIS processing it should be enough to run. What issues are you having in particular? Just general slowness or crashes? 4GB of RAM is on the low side but as long as you aren't doing a lot of parallel processing it should be fine.
... View more
04-17-2012
10:46 AM
|
0
|
0
|
3050
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-17-2011 10:36 AM | |
| 1 | 08-16-2012 10:48 AM | |
| 1 | 10-31-2012 08:39 AM | |
| 1 | 07-16-2012 01:52 PM | |
| 1 | 03-15-2012 10:57 AM |
| Online Status |
Offline
|
| Date Last Visited |
08-22-2024
11:12 PM
|