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

learn more… | top users | synonyms

2
votes
1answer
57 views

Combining duplicate points while preserving their associated attributes

I'm working with building routes for a lit of technician's stops. In some cases, they have two "stops" at the same customer location -- turning on two types of service at a house, for example, is ...
2
votes
1answer
46 views

Trying to preserve attributes using SearchCursor

I am writing a python script for ArcGIS. I'm fairly new to this so I hope I'm not missing something very obvious. I am having trouble preserving the attributes of a polyline feature class when ...
0
votes
1answer
32 views

table update w/ cursor geometry conflict

I'm creating a table using arcpy with a list of results (stored in 2d lists) following an update to some features. This can sometimes include geometry, so I've attempted to substitute those for a ...
0
votes
1answer
200 views

Polygon Neighbors Analysis script (ArcPy 10.1) producing erroneous results?

I'm struggling with a python script that is supposed to calculate a field for a polygon feature class. The calculation is of the average of a field value (P_TOT_DEV) for each of a given polygon's ...
0
votes
1answer
40 views

Copying extents between features

I have a Building feature class whose individual building footprint extents I want to match to associated Level feature classes. Unfortunately, the Level data was converted from DWG files with only ...
3
votes
0answers
84 views

Basic arcpy script with cursors running SLOW!

I've got 2 polygons layers (no gaps): IDUs and crops. What I want is to identify the 3 largest crops by % area for each IDU. This seems common enough but I couldn't find a way to do it all using ...
2
votes
0answers
36 views

Multiple Cursors

Below is the sql statement which I have explained below. Declare Cursor c1 is select store_number ,0 as total_area,0 as BG_ID ,0 as store_geom from table1 where CLIENT_ID= 1 and ORG_ID ...
2
votes
0answers
137 views

Can I use a cursor to select two rows and compare attributes

Can I use the cursor search function to look at the first two rows in a table and select them so I can compare attributes and possibly merge them or change attributes? I am using ArcGIS 10.0
2
votes
0answers
198 views

Processing arcobjects cursor is taking long time

I am maintaining a code on arcobjects 10.1, and there is a bug happening. I have a code that is parsing through a cursor, and generate a where clause statement to run it on a second query. So the code ...
1
vote
0answers
32 views

Error writing defaultdict values to feature class rows

I originally posted building dictionary from feature class field values, how can I ensure there are no duplicate values per key. The goal is to update another field with all the values per key, which ...
1
vote
0answers
82 views

SQL Prefix for arcpy.da.SearchCursor

Does the sql prefix - DISTINCT work well on SDE tables? http://resources.arcgis.com/en/help/main/10.1/index.html#//018w00000011000000 Syntax: SearchCursor (in_table, field_names, {where_clause}, ...
1
vote
0answers
20 views

Q: cursor memory and fields therein

Theoretical Python question. Say you have an update cursor while-loop for a few selected records. While looping through the rows, at some point a nested if statement triggers an "addfield" event. The ...
0
votes
0answers
38 views

Issue with da.updateCursor on shape

I recently posted answer Determining Y coordinate for Create Fishnet from desired Angle of Rotation in Python/ArcPy? . While working on it I found something weird with da.updateCursor on shape field. ...
0
votes
0answers
32 views

GetParameterAsText() with Cursor

I'm trying to use the GetParameterAsText() for user input. When I use a value instead, it works fine but not with GetParameterAsText() Any help will be greatly appreciated AreaFilter = ...
0
votes
0answers
59 views

pyspatialite, cannot update geometry

I'm trying to update geometry column with pyspatialite but it returns error: spatialite.dbapi2.IntegrityError: mypoints.the_geom violates Geometry constraint [geom-type or SRID not allowed] My ...
0
votes
0answers
23 views

Using file directories from a table

I have a toolset that will be using a set of file directories as input (shapefiles, raster etc.).The table can be stored as CSV or DBF. Is there a way to read a specific cell (row,column) of the ...
0
votes
0answers
75 views

Multiple geometry in a cursor SQL

I have a cursor which I create from a table which has one geometry field only. But in my cursor I would be using two geometry fields as I need to calculate two different areas.Below is the sql ...
0
votes
0answers
33 views

SQL cursor issue

I am trying to create a new table using a cursor and a select statements. Declare Cursor c1 is select store_number from table1 where CLIENT_ID= 1 and ORG_ID = 1 ; Type C1_TAB_TYPE ...
0
votes
0answers
68 views

arcgisscripting - setValue error

I'm having difficulty isolating this problem - at the point I attempt to alter a record with update cursor, the script returns a 999999 error. I've tried running this script without ArcMap running in ...