|
POST
|
This was actually a fix for what was previously a bug -- a NULL geometry has no parts, so it no longer returns a Geometry object, but None. Split this up: pt = row.getValue(shapeField).getPart(0) into: val = row.getValue(shapeField) if val: pt = val.getPart(0) else: pt = None Everything written using arcgisscripting should continue to work, this is a weird corner case where your script was depending on incorrect behavior in arcgisscripting that was hard to test against.
... View more
04-24-2012
08:57 AM
|
0
|
0
|
2468
|
|
POST
|
The ArcGIS desktop executables are 32 bit, so they can only consume 32 bit DLLs, Python included. Server 10.1 uses 64 bit Python, but desktop does not.
... View more
04-05-2012
12:57 PM
|
0
|
0
|
1226
|
|
POST
|
Ignore the superfluous log messages behind the curtain. It will run just fine.
... View more
03-01-2012
09:49 PM
|
0
|
0
|
474
|
|
POST
|
Just write your scripts for 9.3. They'll be backwards compatible in 10.0.
... View more
02-22-2012
10:19 AM
|
0
|
0
|
912
|
|
POST
|
Are any of the Python tools using AddError() to put messages in the message box? Once a Python tool calls AddError(), the geoprocessor assumes that script failed.
... View more
02-20-2012
11:19 AM
|
0
|
0
|
450
|
|
POST
|
No, the special tokens can only be used in the list of columns you'd like to select.
... View more
02-20-2012
11:10 AM
|
0
|
0
|
3484
|
|
POST
|
You don't need to call reset(), you should be able to just do for row in arcpy.da.SearchCursor(layer,("SHAPE@","OID@"),sWhereClause,None,False,sql_clause): and avoid all that extra code.
... View more
02-12-2012
08:41 AM
|
0
|
0
|
3484
|
|
POST
|
Use os.path.dirname(sys.argv[0]) or os.path.dirname(__file__) to get the directory
... View more
02-06-2012
07:53 AM
|
0
|
0
|
526
|
|
POST
|
No, the module is totally stand-alone. The only interop with arcpy is that the _server_admin geometry objects interact with arcpy geometry objects with the GeoJson __geo_interface__ magic attribute. >>> arcpy.AsShape(_server_admin.geometry.Point(5, 5).__geo_interface__) <PointGeometry object at 0x24c7790[0xe0a6da0]> >>> _server_admin.geometry.fromGeoJson(arcpy.PointGeometry(arcpy.Point(5, 5) ).__geo_interface__) POINT(5.00000 5.00000) Technically for the time being _server_admin is an undocumented, internal-use only type project for implementing some command line administrative utilities. But I'm glad you like it, it was a lot of fun to write.
... View more
02-03-2012
12:44 PM
|
0
|
1
|
707
|
|
POST
|
Your else isn't actually calling updateRow: else: theRow[12] = 9000 print theRow[12], theRow[4], theRow[5] Another thing you can do now so you don't have to insert all those manual del statements: with arcpy.da.UpdateCursor(UCU_arc, ['LEFT_FID', 'RIGHT_FID', 'LUCU', 'RUCU', 'LGeoDetail', 'RGeoDetail', 'LUnitSub', 'RUnitSub', 'LSubMinor', 'RSubMinor', 'LMinorSpecific', 'RMinorSpecific', 'LineID']) as theRows: for theRow in theRows: <insert code> Once the code leaves the with block, whether it errors or not, it will close the cursor and release any outstanding locks. You don't need to delete theRow since it's a list and not a row object in arcpy.da, so it's not tied to the cursor/cursor's lock.
... View more
01-10-2012
09:58 PM
|
0
|
0
|
718
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-26-2012 02:46 AM | |
| 2 | 01-06-2011 08:22 AM | |
| 1 | 03-25-2014 12:18 PM | |
| 1 | 08-12-2014 09:36 AM | |
| 1 | 03-31-2010 08:56 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|