AnsweredAssumed Answered

How not to Copy Features when too many would be output?

Question asked by graeme on Feb 23, 2012
Latest reply on May 30, 2012 by graeme
This question may or may not be better posed to the Python forum rather than this Geoprocessing forum - but I'll try here first.

I have a 3.5 million polygon layer (cadastre) stored in Oracle via ArcSDE.  I use a polygon feature chosen by an end user from a second layer to copy out the cadastral polygons that intersect it (via Copy Features).  I can get this to work fine for most polygons to get the few seconds to few minutes response needed by using the polygon the user chooses to set the geoprocessing extent (arcpy.env.extent) prior to executing Copy Features.

However, for a few polygon features that the user might choose (think petroleum or gas pipeline corridor), the number of polygons that would be copied out can number up to about 200,000.  These can be copied in about 15 mins, but rather than get all of these back so that I can write them into a very bloated PDF report, I would like to save time and pages by having the option to set a maximum number of features that can be copied out i.e. be able to set a MaxRecordCount = 500 that would stop the Copy Features once 500 had been copied.

Is there a way to tell Copy Features to only copy up to a maximum number of features?

Alternatively, is there a fast way to get a count of how many features in an ArcSDE layer are within the current geoprocessing extent?

Outcomes