I have a feature class with 790,000 points (and it is constantly increasing). I need to select some of them (approx. 350,000), and then buffer that selection.
Currently, the process runs like this (pseudocode):
arcpy.MakeFeatureLayer_management(fcIn, tempLayer, '"CUST" LIKE \'%G%\'') arcpy.Buffer_analysis(tempLayer, fcOut, "150 Feet", "FULL", "ROUND", "ALL", "")
The Buffer step is prone to failure due to memory errors, which isn't terribly surprising. To get around that, I would like to further subset the selection, creating a bunch of buffers and then merging them all at the end. I know that this will take at least as long as (and probably longer than) a single Buffer operation, but avoiding a complete failure is a higher priority.
The question: how do I structure a loop that iterates selecting 10,000 (or so) points at a time and then buffers them? I am struggling to turn the iteration concept into code that will work with feature layers.
(And of course, if this is a terrible, unworkable idea, please let me know. I'm not very committed to it yet.)