We will be providing blog posts on best practices with Spatial Studio, and we begin here with spatial filters. But before we begin, a quick comment; understanding best practices such as the info below will become less and less important with future releases. This is because we plan to enhance Spatial Studio with an increasingly guided UX to avoid pitfalls. Now on with the info...
Spatial Studio supports multi-step analyses, where the result of an analysis is input to another analysis. In these cases the steps can be accomplished in more than 1 possible order of operations. However the order of operations can make a huge difference in performance, particularly with spatial filters.
The rules to follow for spatial filters are:
Here's an example to illustrate this:
In a previous article we demonstrated a spatial filter to identify Urban Areas located in the British Isles (UK and Ireland). The spatial filter operation was a 1-step process involving datasets based on tables (uploaded from Shapefiles) which worked just fine and there was no ambiguity in any order of operations. As a multi-step example, we'll identify Airports located in an Urban Area and in the British Isles. We begin by adding AIRPORTS from Natural Earth using the same steps as shown in previous article linked above:
We have a few options to accomplish our scenario and need to understand which is the right way to go.
Option 1: Filter for Airports in British Isles, and then filter that result for items in Urban Areas. We reject this option since it applies a spatial filter to an analysis result
Option 2: Filter for Airports in Urban Areas, and then filter that result for items in British Isles. Again, we reject this option since it applies a spatial filter to an analysis result
Option 3: Filter for Urban Areas in British Isles, and then filter Airports using the result of the 1st analysis as the search area. This follows the rule of creating the overall spatial filter using analyses, and applying the spatial filter to a layer based on a table
We now proceed with the scenario using the preferred Option 3 above:
We encourage you to follow this approach to ensure performant spatial filter analyses. If you run into performance issues with a spatial filter analysis, the first thing to check will be whether this best practice has been followed.