We need spatial queries that are:
One option would be Spatial SQL Definition Queries. But as mentioned in that idea, spatial database operations are notoriously slow and are difficult to set up correctly (as @JoshuaBixby mentions in a comment here).
So I'm wondering if “Select By Location” functionality could be used as an alternative mechanism, since that tool is surprisingly fast, even for large datasets.
Could functionality be added to ArcGIS Pro that lets us convert the selected features from Select By Location into a fully-functional feature layer?
The layer needs to be refreshable:
We would also need the ability to modify the Select By Location parameters after the feature layer was created. For example, put modifiable Select By Location parameters right in the layer properties. Or a button that brings up the Select By Location window with the existing layer's settings preloaded, ready to be adjusted and rerun.
I’m aware that it’s possible to create a layer from a selection using the Create Layer from Selected Features tool. But I don’t think those layers are dynamic/modifiable/refreshable, so have limited use.
It might be possible to create a model or Python script to produce FCs that are similar to what we want — output a FC using spatial operations and re-run the script on-demand to replace the data. But that would require time, effort, and skill to develop. And couldn’t be refreshed automatically. Further, even manual refreshing would be slow because ArcPy is slow to initialize compared to Select By Location.
One of the benefits of this idea is that it would use ArcObjects, which means it would support all datatypes, such as file geodatabases.
Whereas the Spatial SQL Definition Query idea would only work for datatypes that have spatial functions in the database, such as enterprise and mobile geodatabases, not file geodatabases.
I suppose, behind the scenes, the layer would be a list of objectids, which is somewhat similar to "Create Layer from Selected Features". But the difference would be: the layer is modifiable and refreshable. I wonder if the underlying query that's sent to the database would look like this:
Would something like that be possible? It seems like it would be very useful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.