SpatialFilter query in Python

Discussion created by xintaoliu on Oct 28, 2012
Latest reply on Oct 29, 2012 by dhoneycutt-esristaff
In C# and ArcEngine, there is SpatialFilter Class that can execute spatial and attribute query at the same time. In Python, we need to use the following two steps:
1:  gp.SelectLayerByLocation(inLayer, "intersect", pAOI, "", "", "NEW_SELECTION")
2:  gp.SelectLayerByAttribute(inLayer, "SUBSET_SELECTION", whereClause)

If there are many features in the input layer, step 1 will be very consuming.

Any reply and suggestion is highly appreciated. Thanks!