Getting Started with Attribute Filtering
Last updated
Was this helpful?
Last updated
Was this helpful?
Attribute filtering is a new concept which we have introduced as part of OS Select+Build. The filters can help you to narrow down the exact data you need from the OS National Geographic Database (NGD). If required, you can add attribute filters to individual feature types when you create a new bespoke recipe of OS NGD data using OS Select+Build. (The has step-by-step instructions on how to create a new recipe.)
The following sub-sections give step-by-step instructions on how to add attribute filters to a new recipe and provide worked examples of creating both simple and nested filters.
To add attribute filters to a new recipe:
The Advanced Filter Options panel will slide into view from the right, you can begin to build your filter(s):
For a simple filter, select +Add rule.
For a more complex nested filter, select +Add group.
Once you have added all of your relevant filters, click Apply Filter.
Click the Create recipe button.
In the following worked example of creating a simple filter, we will use the OS NGD Buildings Theme and select the Building Part Feature Type from the Building Features Collection. Our aim is to build a filter to select buildings where education is recorded as the land use.
The Advanced Filter Options panel will slide into view from the right, where you can begin to build your filter(s).
In the Advanced Filter Options panel, click + Add rule, then select OSLandUseTierA from the first drop-down.
Leave the operator in the second drop-down as: = (i.e. the equal sign), then select Education from the third drop-down.
Click Apply filter.
Click the Create recipe button
Your filter will return buildings where education (Education) is recorded as the land use (OS Land Use Tier A attribute).
What if, in addition to the simple filter above (returning results for buildings with a land use of education), we want those results to show only buildings over 15 metres in height? What if you also wanted to add an additional filter to show buildings with a land use of rail? To achieve this, you could create a nested filter using the + Add group option.
In this case, you should select And from the And / Or selector.
Next, click + Add group.
The application has drawn an extra box for you. Whatever rules are contained inside this box will be evaluated together, before combining with any rules outside the box.
Before continuing, select whether you would like the rule in the second group to have an And or an Or condition. In this case, you should select Or from the And / Or selector.
In the rule in the extra box, select OSLandUseTierA from the first drop-down, leave the operator as = (i.e. the equal sign) in the second drop-down, and select Transport: Rail from the third drop-down.
Click Apply filter.
Your filter will return results for buildings (Building Part) that have either an education (Education) land use if that building is over 15 metres high or a railway land use (Transport:Rail).
To check what filters have been applied to feature types in an existing recipe:
You are now within the Recipe details screen, where you can view detailed information about the recipe, including the recipe's name, the date it was created, etc. If filters have been applied to the recipe, a filter icon (i.e. a black funnel symbol) will appear under the recipe name alongside text stating: 'Filters have been applied to this recipe'.
Click View all filters to view all of the filters that have been applied to feature types in the recipe.
In the example recipe below, you can see that there is a filter icon (i.e. the black funnel symbol) against the Building Part Feature Type; therefore, this feature type has filters applied to it.
See the for more information on creating recipes.