Tag Info

New answers tagged


If using python (as your tag suggests), and ArcGIS (maybe?), you could do something like this ... (edited) # Check to be sure there is at least one feature selected. ftrCountBefore = int(arcpy.GetCount_management(layer).getOutput(0)) # ToDo Perform a Selection # ftrCountAfter = int(arcpy.GetCount_management(layer).getOutput(0)) if (not (ftrCountBefore == ...


Try this, it isn't the same problem (Vector layer), but it could help you: Openlayers - Losing selection or style on layer redraw


Answer came from http://forums.arcgis.com/threads/35323-ArcPy-amp-SelectLayerByLocation-Performance?p=119047#post119047 Thanks Jason Scheirer for some more concise code: SelectLayerByLocation(in_layer=arcpy.PointGeometry(arcpy.Point(x, y)), select_features="mylayer") And especially to Chris Snyder for a performance tip: A speedier work around might be ...

Top 50 recent answers are included