Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
159 views

Updating 3 million rows in file geodatabase

I have a GDB which has 3 million annotation data, then I would like to modify some filed values based on csv table I'm using the following ArcPy scripts now, but it's too slow import arcpy import ...
icye's user avatar
  • 9
0 votes
0 answers
797 views

ArcPy script extremely slow with Search and Update Cursor

I have developed a Python script to automatically retrieve the maximum height in a certain distance around my input polygon feature class. The height should be calculated for each 5 meters. For a ...
GIS_USAr's user avatar
1 vote
2 answers
224 views

Making ArcPy code run faster

I have an ArcPy code that I am using to find various characteristics about certain watersheds in Indiana. I start with a shapefile of all 800 watersheds and go through it row by row and perform a ...
Shannon 's user avatar
1 vote
1 answer
48 views

Update Cursor running for 4 hours

I am trying to update one field with values as multiples of five till the maximum for the value in the gridcode. The field I am trying to populate is called Time_min. As I am very new to python, am ...
Debayan Mandal's user avatar
7 votes
1 answer
274 views

ArcPy UpdateCursor auto pausing after every 1000 records

I have an update cursor running that updates a field based on a lookup table (Python dictionary). The cursor completes fine, but seems to pause and hold after each 1000 records - I have a test in it ...
dklassen's user avatar
  • 2,920
2 votes
1 answer
73 views

Updating field in geodatabase table depending on other field using ArcPy?

I have a table in a file geodatabase that has "FieldA" and "FieldB". I want to update FieldB with one of two values, depending on if there are one or more records with the same value of FieldA. ...
Rui Neves's user avatar
-1 votes
1 answer
102 views

More Pythonic way to loop through UpdateCursor?

I have several sets of fields to populate based on other fields. The code below works, but I am wondering if there is a more Pythonic way to march through the i,j pairs? (Actual fieldnames are not ...
a11's user avatar
  • 950
1 vote
2 answers
71 views

Comparing Object Fields to a couple million rows with a SearchCursor from arcpy

I'm new to GIS. I'm using arcpy.da.SearchCursor to read from a SQL server, and when I read through the first table I create objects ~350,000 of them. cursor = arcpy.da.SearchCursor(...
SonSchem's user avatar
1 vote
1 answer
652 views

Improving poor performance of ArcPy update cursor with ArcSDE and Editor? [closed]

I am using ArcGIS 10.5 in an ArcSDE environment. I have two tables, they are the exact same table schemas, but one is being edited and those edits are being pushed to the main table. I am a little ...
ed.hank's user avatar
  • 3,862
1 vote
1 answer
177 views

Using Search/Update Cursor?

I am trying to get field values from one table and use them to perform calculations on a row in another fc table. Does anyone have any ideas on how to make this run faster? I've tried a dictionary ...
fell1ntograce's user avatar
2 votes
2 answers
227 views

Reduce Processing Time for Update Cursor

I am updating a field for a feature class that is on an enterprise geodatabase in SQL server. This is an ArcSDE connection. My goal is to search for null values, and convert these to 0. The script ...
saoirse's user avatar
  • 246
14 votes
5 answers
3k views

Looping through 16 million records using ArcPy?

I have a table with 8 columns and ~16.7 million records. I need to run a set of if-else equations on the columns. I've written a script using UpdateCursor module, but after a few million records it ...
cpt_python's user avatar
8 votes
1 answer
2k views

How to improve performance of nested search cursors?

I have three nested SearchCursors. It works correctly but with slow performance. There are some solutions to improve the searchcursor performance like dictionary but i don't know how to use it with ...
BBG_GIS's user avatar
  • 5,835
3 votes
1 answer
814 views

Speeding up Arcpy script with lots of for loops and cursors?

I'm running this chunk of code (below) inside a larger script. This section is supposed to find the time for each boat (mmsi) that is closest before and closest after a single detection time. It first ...
confused_coder's user avatar
1 vote
2 answers
170 views

Removing duplicate pairs in Near Table

Generate Near Table or Near can be used on a single Feature Class to find the nearest feature to each feature. arcpy.GenerateNearTable_analysis(featureClass, featureClass, pairsTable) This results ...
jbosq's user avatar
  • 449
1 vote
2 answers
2k views

Using two with statements with arcpy.da.SearchCursor()?

I often see code that is comparing 2 shapefiles where there needs to be 2 with statements in the same loop. In my head I always thought both with statements should be placed first before starting ...
JamesLeversha's user avatar
3 votes
1 answer
3k views

Which is the faster way to copy data to another feature class: Feature Class to Feature Class or Insert Cursor

I have a feature class with 1 million records. Which is the faster way to copy data to another feature class: Feature Class to Feature Class or Insert Cursor?
Astha Devra's user avatar
1 vote
1 answer
64 views

Replace Statistics_analysis with SearchCursor?

I'm using ArcGIS 10.3, 64bit with an advanced license. I have the following code, that runs just fine. It goes through a table that contains a large number of entries with zip-codes and population ...
dru87's user avatar
  • 1,477
0 votes
1 answer
289 views

Improving processing time of ArcPy script?

Background: I work for an electrical utility, and we have a point feature class called "meters" that contains approximately 35,000 records. These records represent the actual power meter, and contain ...
tauntobr's user avatar
1 vote
1 answer
261 views

Increase python script speed [closed]

for row1 in cursor1: if row1[0] != None: num3=row1[0].upper() custx=row1[4] custy=row1[5] num2=row1[8] try: m=re.search(r"^[0-9]+(?=\s)",row1[...
ketar's user avatar
  • 476
19 votes
2 answers
3k views

How is the data access cursor performance so enhanced compared to previous versions?

The data access module was introduced with ArcGIS version 10.1. ESRI describes the data access module as follows (source): The data access module, arcpy.da, is a Python module for working with ...
Aaron's user avatar
  • 51.8k
10 votes
5 answers
1k 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. ...
Stéphane Henriod's user avatar