All Questions
12 questions
0
votes
1
answer
34
views
Converting extent to int is changing value [closed]
I am iterating to get extents (XMin, XMax, YMin, YMax) of each feature (1 deg x 1 deg polygons). The values of the extents parameters are double precision and display to one decimal place. I need to ...
0
votes
2
answers
129
views
Iterating over (selected) features by the same id
I have a feature class Test_NearestNeighbor_Code. This feature class has 7373 polygon features and a column/ field called osm_id. I want to do a calculation with all features that have the same osm_id....
0
votes
1
answer
114
views
All rows are being overwritten with last features value using arcpy.da.UpdateCursor
I am trying to populate fields based on objects. When trying to use Update Cursor it overwrites all of the row values with information from the last feature read. I am sure that I am meant to get it ...
1
vote
1
answer
630
views
Getting for loop which stops after first one to iterate properly?
I originally asked UpdateCursor can't acquire lock, but can acquire lock in TestSchemaLock and got some help about why my code wasn't acquiring a lock.
My new problem is that my code isn't fully ...
1
vote
1
answer
1k
views
RuntimeError: General function failure when running arcpy.da.SearchCursor
I have a script that was previously working but just started throwing an error out of the blue. Here is the traceback:
Traceback (most recent call last):
File "<ipython-input-68-be384b1c4968>...
0
votes
1
answer
66
views
Batching field calculations and feature classes in feature dataset using ArcPy?
I'm working on writing a script that will calculate facility ID's for feature classes in a feature dataset. Is there a way to do this without making feature layers and doing select/field calculate ...
6
votes
3
answers
15k
views
Iterate through features to use selection as input for ExtractByMask
I need to iterate through each of the features of a feature class successively to use each one as the mask to extract from a raster with the ExtractByMask tool. Basically I'm looking for the "Iterate ...
2
votes
2
answers
980
views
Iterating through records specific number at a time using ArcPy?
I'm working with a table that has over 180,000 records. My code searches through the table and pulls field values (meeting a SQL statement) into a list. This list is used as part of a Search by ...
4
votes
1
answer
572
views
Use update cursor in arcpy to count number of points within each polygon
I have two shapefiles. One contains many points across a state. The other is all the counties within the state. I would like to do two things:
use a cursor to count how many points are in each county ...
3
votes
1
answer
838
views
arcpy.da.UpdateCursor "iteration not started" when using pairwise iteration through cursor
Without getting too much into the context of this workflow, I'm trying to find whether a stream segment is flowing in the right direction. If the "FROM_NODE" or the "TO_NODE" values of two adjacent ...
2
votes
1
answer
584
views
Using update cursor with list of shapefiles?
I'm still pretty new to using cursors. What I'd like to do is create a list of shapefiles. Within those shapefiles I would like to populate a field "NAME" with the shapefile name less the .shp ...
4
votes
1
answer
12k
views
Why does the next() method fail after the last record, using arcpy.da.SearchCursor?
Using the older arcpy.SearchCursor, the next() method would return Nothing once the last record had been passed.
Using the newer arcpy.da.SearchCursor, I'm finding that the next() method crashes the ...