|
POST
|
You are correct you need Python 2.7.5 with ArcGIS 10.2.1. Have you tried installing the 64-bit upgrade for 10.2.1?
... View more
04-14-2014
11:31 AM
|
0
|
0
|
602
|
|
POST
|
How are you executing this code? Through an add-in? Toolbox? Something else?
... View more
04-14-2014
08:36 AM
|
0
|
0
|
1472
|
|
POST
|
Use arcpy.env.overwriteOutput = True I'm not sure why delete wouldn't remove your temp feature class unless you are mixing workspaces. in_memory is process specific, so if you run a tool from one instance, another instance would not be referencing the same in_memory workspace.
... View more
04-14-2014
07:37 AM
|
0
|
0
|
1472
|
|
POST
|
Yes, that is exactly what you are telling it to do. If you want to actually utilize the in_memory workspace you must include that as a path. arcpy.Dissolve_management(layers['parcels_fc'], r"in_memory\working")
arcpy.da.SearchCursor(r"in_memory\working", ["SHAPE@"])
... View more
04-14-2014
07:07 AM
|
0
|
0
|
1472
|
|
POST
|
Spatial Analyst for ArcGIS Server is a separate extension requiring it's own license. http://www.esri.com/software/arcgis/arcgisserver/extensions/spatial-extension Their licensing is separate but their geoprocessing overlap.
... View more
04-10-2014
08:35 AM
|
0
|
0
|
1116
|
|
POST
|
Yeah there are no desktop references. You will need to add these to your system paths, and possibly remove the server library references. Modifying depending on what drive/folder you have desktop installed. You will need the 64 bit desktop geoprocessing patch if you don't already. 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.2\\bin',
'C:\\Program Files (x86)\\ArcGIS\\Desktop10.2\\arcpy',
'C:\\Program Files (x86)\\ArcGIS\\Desktop10.2\\ArcToolbox\\Scripts' I'm not 100% sure if this will solve your problem or not as I've never dealt with a mixed install like this before.
... View more
04-09-2014
09:34 AM
|
0
|
0
|
1116
|
|
POST
|
The entire sys.path output will tell you if you are reading from the desktop or server libraries or both.
... View more
04-09-2014
08:29 AM
|
0
|
0
|
2480
|
|
POST
|
Ahh yes. An ArcServer install cannot use desktop licenses. Are you using 64 bit Python for desktop? What is your output from sys.path?
... View more
04-09-2014
08:07 AM
|
0
|
0
|
2480
|
|
POST
|
As James said earlier you have to actually check out the license with this line. arcpy.CheckOutExtension("Spatial")
... View more
04-09-2014
07:07 AM
|
0
|
0
|
2480
|
|
POST
|
The OBJECTID should not be required, if it ever was it is a bug and is fixed in 10.2.1.
... View more
04-08-2014
08:53 AM
|
0
|
0
|
1366
|
|
POST
|
OK, THANKS I GET AN ANSWER BY RUNNING THE BELOW TEXT: import arcpy
fc = "D:\\Projects\\proj1\\SumsOfRoutes.gdb\\all_routes_1stBatch"
field1 = "r_Identity"
##field2 = "Shape_Length"
sql = [None,"Group BY r_Identity, ObjectID"]
fields=[field1]
cursor = arcpy.da.SearchCursor(fc,fields,sql_clause=sql)
# print r_Identity and Shape_Length of each feature in feature class
for row in cursor:
print str(row) Only I don't understand the thing with the OBJECTID, and more so, this constellation DOES NOT HELP ME, AS I CAN'T REACH THE OTHER FIELDS OF THE FEATURES. substitute field1 with "*" brings back the runtime error You cannot use '*' when using sql_clause. You must specify each field explicitly.
... View more
04-08-2014
07:42 AM
|
0
|
0
|
1366
|
|
POST
|
You must list all fields that will be included in the sql_clause parameter in the fields parameter. fc = r'H:\Documents\ArcGIS\Default.gdb\RainGauges'
fields = ('Data_Type', 'ObjectID')
sql=[None, "GROUP BY Data_Type, ObjectID"]
cursor = arcpy.da.SearchCursor(fc, fields,sql_clause=sql)
for row in cursor:
print row[0]
... View more
04-08-2014
07:30 AM
|
0
|
0
|
1366
|
|
POST
|
Give this a try.
layer = r'CNT_Anno'
cur = arcpy.da.UpdateCursor(layer, ['TextString', 'CNT_PT_ID'])
for row in cur:
if row[0]:
try:
if int(row[0]) >= 9000:
row[1] = int(row[0])
cur.updateRow(row)
except:
pass
if row[1] is None:
cur.deleteRow()
... View more
04-08-2014
05:19 AM
|
0
|
0
|
1284
|
| 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
|