Cursors are used by database programmers to process individual rows returned by database system queries.

learn more… | top users | synonyms

14
votes
2answers
2k views

Exporting table to XYZ ASCII file via ArcPy?

I'm looking for a way to export an ArcGIS table (created with the Sample tool) to a text file via ArcPy. I can do this in ArcGIS via the context menu by right-clicking the table, but have not found ...
3
votes
2answers
538 views

Move the cursor backward - opposite of row = rows.next()

I'd appreciate if anyone could please tell me if there is a way to go up one row in python cursor. opposite of row = rows.next() Thank you!
9
votes
5answers
372 views

How to improve performance when using ArcGIS cursors in Python with big tables?

I have a pretty big point feature class in a file geodatabase (~4 000 000 records). This is a regular grid of points with a 100m resolution. I need to perform a kind of generalization on this layer. ...
4
votes
2answers
166 views

Is it a bad idea to convert a File Geodatabase table to a dictionary?

First, what am I trying to do? I am building a Python script that should be called from an ArcMap 10.0 toolbox. This scripts uses (among other inputs) data contained in huge gdb tables. It processes ...
2
votes
1answer
237 views

Only perform Near analysis on selected rows

I am writing a Python script to perform a near analysis on features from two different shapefiles with common attributes. This is happening in a Search Cursor. However, whenever I tried to use the ...
2
votes
2answers
441 views

GROUP BY clause in the UpdateCursor arcpy.da

I need to specify a "group by" clause for UpdateCursor arcpy.da. From here I found out that it's possible to do using an optional pair of SQL prefix and postfix. But there are no examples and I'm ...
2
votes
1answer
348 views

Am I over-complicating adding and then calculating fields? Suggestions for a better way? (Python)

I'm attempting to re-position a question I asked yesterday here. I am starting to think that the way I wrote my code just isn't the best way. Am I overcomplicating things? I know for a fact that ...
2
votes
1answer
743 views

Incorrect field name resulted in RuntimeError: ERROR 999999 (Also, better code for adding and calculating fields)

This is the bottom half of my code (and it's been edited somewhat to share publicly). The code works perfectly fine when the fieldList has only three fields in it, but when I populate it with all 108 ...
1
vote
3answers
296 views

Does arcpy.SearchCursor function support field indexing?

Does the arcpy.SearchCursor function support field indexing? In the sample script below, can I sent my cursor to loop through the values in the first field by setting an index to search the first ...
0
votes
1answer
38 views

Updatecursor returns with 'variable not defined'

I am fighting a bit with the cursor function since this morning. Thanks to the help of the people here and some tutorials I found I got this far import arcpy arcpy.env.workspace = ...
-1
votes
2answers
241 views

ArcPy: (SearchCursor/export to tiff ) with no output [closed]

I'm trying to write a script that uses a search cursor to loop through a field in a .shp file (Incident_Z) find every value that meets a specific condition (zip code=10004) and then at a scale of ...