View by status   

Copy Features on Selected Features to be as quick as on Definition Query


  • 180

  • I have two layers in a map that use the same data source (an ArcSDE for Oracle feature class with 3.5 million polygons).

    On one layer I select one polygon using an expression.

    On the other I set a definition query using the same expression (to isolate the same polygon).

    Copy Features on the first layer (to create a one polygon shapefile) takes 4.25 minutes.

    Copy Features on the second layer (to create the same one polygon shapefile) takes less than a second!

    The Definition Query method provides an easy (and awesome) workaround to using the Select By Attributes method when you know the expression used to isolate the desired polygon.

    However, when that same polygon has been Selected by pointing at it on the screen, I keep thinking that there should be a way to set a definition query from the spatial selection, in order to make possible a Copy Features on it just as quick (i.e. sub-second). 

    Can a fast way to access the OBJECTID of a selected feature be exposed to ArcPy so that it can be used to set a Definition Query, please?
    Tags :
     Copy Features,Definition Query,ArcSDE,ArcPy
    Posted by   graeme  to ArcGIS DesktopGeodatabase Nov 9, 2011

Share this idea Report Abuse

Comments (3)

Please log in to post a comment.

Feb 22, 2012
Working with selections with geoprocessing tools has been significantly enhanced at 10.1.

Nov 9, 2011
Many thanks for commenting on this Chris. 

I downloaded the tool and script you pointed me at am very pleased to say that the same selection I used in my posting was converted by it to a layer with a Definition Query based on OBJECTID in 4 seconds and then that "definition queried layer" copied using Copy Features in 1 second.

In other words what was taking me 4.25 minutes can now be done in 4-5 seconds. 

If 10.1 can beat that then I'll be even more impressed!

Nov 9, 2011

The performance of geoprocessing tools has been much improved on selection sets at 10.1. Until that time check out the following code gallery submission that uses python to create a layer with a definition query based on a selection set:



Terms and Conditions   |    Feedback   |   FAQs
Previous MonthNext Month