> For the complete documentation index, see [llms.txt](https://docs.os.uk/more-than-maps/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.os.uk/more-than-maps/using-os-mapping-apis/accessing-greenspace-data-using-os-ngd-api-features.md).

# Accessing greenspace data using OS NGD API – Features

A guide outlining how you can create an OS MasterMap Greenspace Layer equivalent using OS NGD API – Features.

{% hint style="warning" %}
The OS MasterMap Greenspace Layer product will become End of Life on 31 March 2027. As of this date, Ordnance Survey will cease to maintain or publish updates, and access to the product will be removed from the OS Data Hub, OS Features API and OS Vector Tile API.

For the latest updates and information on this and other products, please refer to our [strategic product roadmap](https://www.ordnancesurvey.co.uk/products/roadmap) and [End of Life Product Notice](https://docs.os.uk/os-downloads/resources/product-resources/end-of-life-product-notices/end-of-life-notice-os-mastermap-greenspace-layer) pages.
{% endhint %}

### OS MasterMap Greenspace and the OS NGD

You might currently be using the [OS MasterMap Greenspace Layer product](https://docs.os.uk/os-downloads/products/land-and-terrain-portfolio/os-mastermap-greenspace-layer) to get a detailed dataset of the green spaces present within urban areas in Great Britain. This product will reach its End of Life and be withdrawn on 31 March 2027. More information about the product's withdrawal is available from the [End of Life Notice – OS MasterMap Greenspace Layer](https://docs.os.uk/os-downloads/resources/product-resources/end-of-life-product-notices/end-of-life-notice-os-mastermap-greenspace-layer) page.

While there's no like-for-like replacement download product for OS MasterMap Greenspace Layer, you can create a recipe in OS Select+Build to download the equivalent greenspace data from the OS National Geographic Database (OS NGD). For a guide on how to do this, visit our [Greenspace recommended recipe page](https://docs.os.uk/osngd/getting-started/downloading-with-os-select+build/getting-started-with-os-recommended-recipes/greenspace-recipe-guide).&#x20;

Alternatively, you can use OS NGD API – Features to access equivalent greenspace data from the OS NGD without downloading data from OS Select+Build; this page provides guidance on how to do this.

For a detailed comparison of OS MasterMap Greenspace Layer and equivalent OS NGD data, visit our [comparison page](https://docs.os.uk/more-than-maps/os-ngd-migration/comparison-of-os-mastermap-greenspace-layer-and-os-ngd).

### What is greenspace? <a href="#what-is-greenspace" id="what-is-greenspace"></a>

The term 'greenspace' is used in urban planning, environmental management and public health policy, and refers to land covered by vegetation or areas of water (also known as 'bluespace'). It's now well recognised that green spaces deliver social, economic and environmental benefits. Consequently, greenspace is a concept used to frame discussion and deliver progress for improving quality of life, mitigating climate change and enhancing biodiversity.

### Getting started with OS NGD API – Features

**Before following the guide below, you will need to have:**

* A GIS software application or web mapping library that can access OS APIs.
* An OS NGD API – Features API Key. See [Getting started with an API project](https://docs.os.uk/os-apis/core-concepts/getting-started-with-an-api-project) for more information on how to get started with an OS API project and get an API Key.
* Followed the [Getting Started](https://docs.os.uk/os-apis/accessing-os-apis/os-ngd-api-features/getting-started) instructions for your chosen GIS software. This guide covers QGIS and Esri ArcGIS Pro.

### Which OS NGD feature types do I need?

The information supplied in the single feature type in OS MasterMap Greenspace Layer is provided by four corresponding feature types across three collections within the OS NGD:

| Theme            | Collection            | Feature Type                                                                                                  |
| ---------------- | --------------------- | ------------------------------------------------------------------------------------------------------------- |
| OS NGD Land      | OS Land Features      | [Land](https://docs.os.uk/osngd/data-structure/land/land-features/land)                                       |
| OS NGD Transport | OS Transport Features | [Rail](https://docs.os.uk/osngd/data-structure/transport/transport-features/rail)                             |
| OS NGD Transport | OS Transport Features | [Road Track Or Path](https://docs.os.uk/osngd/data-structure/transport/transport-features/road-track-or-path) |
| OS NGD Water     | OS Water Features     | [Water](https://docs.os.uk/osngd/data-structure/water/water-features/water)                                   |

Further guidance on how to access these feature types through OS NGD API – Features is provided below; this guide covers QGIS and Esri ArcGIS Pro.

## QGIS

{% hint style="info" %}

## QGIS version used

This guide was written using QGIS Desktop 3.44.15 Solothurn.
{% endhint %}

### Connecting to the API

It may be beneficial to use a basemap such as [OS Maps API](https://docs.os.uk/os-apis/accessing-os-apis/os-maps-api) to locate your area of interest before loading other data; doing so ensures you only load the data you want and reduces processing times.

On the main ribbon:&#x20;

* Navigate to *Layer* > *Data Source Manager* > *WFS / OGC API - Features dialog*.
* Select your OS NGD API – Features connection in the dropdown, if necessary.
* Click *Connect*.
* Check *Only request features overlapping the view extent* (at the bottom of the window)*.* This sets the bounding box for the features being retrieved to only the current view.
* When you click *Connect*, a list of layers available in OS NGD API – Features populates in the main box.

The four layers we need require filtering before loading – to do this, follow the 'Filtering data' instructions below.

{% hint style="info" %}

## Layers and rate limits

As best practice, only load layers and data that relate to your current task – not all layers. The more features you call, the longer it takes to load them into QGIS. In addition, each feature, regardless of its layer, counts towards your [rate limits](https://docs.os.uk/os-apis/core-concepts/rate-limiting-policy).
{% endhint %}

### Filtering data

We recommend using the latest data schema version available for OS NGD feature types unless you have a specific need to use an earlier one. (See the [Data schema versioning page](https://docs.os.uk/osngd/getting-started/os-ngd-fundamentals/data-schema-versioning) for more information on data schema versioning in the OS NGD.)

{% hint style="info" %}
**Why are filters needed?**

* The Land, Rail, and Road Track Or Path Feature Types include both manmade and natural features. You can filter on the OS Land Cover Tier A attribute to select just the feature types used in this recipe, so that only features that have one of the natural land cover values will be included in the data. More information on the OS Land Cover Tier A attribute values is available from the [Land Cover Tier A Value Code List](https://docs.os.uk/osngd/code-lists/code-lists-overview/landcovertieravalue).
* A filter is also required on the Water Feature Type on the Description attribute to filter out areas of tidal water that are considered part of the sea; thus leaving inland water features (for example, rivers, ponds, lakes or reservoirs) plus tidal water in river estuaries and sea lochs that can be considered as an amenity.
  {% endhint %}

#### **Land**

1. Select your desired version of the Land Feature Type (at the time of publishing in October 2026, the latest was Land v3.3) from the list in the WFS / OGC API - Features dialog window.
2. Click *Build Query.*
3. In the Query Builder window that opens, enter the following into the expression text box:&#x20;

   ```
   oslandcovertiera IN ('Mineral', 'Open Vegetation', 'Open Vegetation And Mineral', 'Trees', 'Multiple')
   ```
4. Click *Test* to check the query will work, then *OK.*

#### **Rail**

1. Select your desired version of the Rail Feature Type (at the time of publishing in October 2026, the latest was Rail v3.1) from the list in the WFS / OGC API - Features dialog window.
2. Click *Build Query.*
3. In the Query Builder window that opens, enter the following into the expression text box: &#x20;

   ```
   oslandcovertiera IN ('Mineral', 'Open Vegetation', 'Trees')
   ```
4. Click *Test* to check the query will work, then *OK.*

#### **Road Track Or Path**

1. Select your desired version of the Road Track Or Path Feature Type (at the time of publishing in October 2026, the latest was Road Track Or Path v3.2) from the list in the WFS / OGC API - Features dialog window.
2. Click *Build Query.*
3. In the Query Builder window that opens, enter the following into the expression text box:&#x20;

   ```
   oslandcovertiera IN ('Mineral', 'Open Vegetation', 'Trees', 'Water')
   ```
4. Click *Test* to check the query will work, then *OK.*

#### **Water**

1. Select your desired version of the Water Feature Type (at the time of publishing in October 2026, the latest was Water v3.1) from the list in the WFS / OGC API - Features dialog window.
2. Click *Build Query.*
3. In the Query Builder window that opens, enter the following into the expression text box:&#x20;

   ```
   description <> 'Sea'
   ```
4. Click *Test* to check the query will work, then *OK.*

### Loading data

{% hint style="warning" %}

## Rate limits

Navigate to your area of interest before loading data. Each feature called by the API counts towards your [rate limits](https://docs.os.uk/os-apis/core-concepts/rate-limiting-policy).
{% endhint %}

1. Navigate to your area of interest.
2. Ensure *Only request features overlapping the view extent* is checked.
3. Following the steps above, the list in the WFS / OGC API - Features dialog window should have the "Sql" column populated for the four layers.

* Select the Land, Rail, Road Track Or Path, and Water layers with the SQL queries against them (select multiple layers by holding the Ctrl key).
* Click *Add*.
* The layers will then display in the Layers panel and the data will display on the map.
* Close the Data Source Manager window.

*This method provides all open vegetation, mineral, trees, residential garden and inland water areas for your area of interest. The data can be further filtered to meet your use cases (supported by* [*data structure*](https://docs.os.uk/osngd/data-structure/data-structure-information) *and* [*code list*](https://docs.os.uk/osngd/code-lists/code-lists-overview) *documentation) by finding the desired layer in the Layers panel, right-clicking, selecting Filter and amending the expression, filtering the data to meet your needs.*

## Esri ArcGIS Pro

{% hint style="info" %}

## ArcGIS Pro version used

This guide was written using ArcGIS Pro 3.6.2.
{% endhint %}

### Connecting to the API

1. It may be beneficial to use a basemap such as [OS Maps API](https://docs.os.uk/os-apis/accessing-os-apis/os-maps-api) to locate your area of interest before loading other data; doing so ensures that you only load the data you want and improves processing times.
2. In the Catalog panel, navigate to *Servers* > *OS NGD API – Features* > *Features*. This should display a list of available feature types.

{% hint style="info" %}

## Layers and rate limits

As best practice, only load layers and data that relate to your current task – not all layers. The more features you call, the longer it takes to load them into QGIS. In addition, each feature, regardless of its layer, counts towards your [rate limits](https://docs.os.uk/os-apis/core-concepts/rate-limiting-policy).
{% endhint %}

### Loading data

{% hint style="warning" %}

## Rate limits

Navigate to your area of interest before loading data. Each feature called by the API counts towards your [rate limits](https://docs.os.uk/os-apis/core-concepts/rate-limiting-policy).
{% endhint %}

1. In the Catalog Panel, select the Land, Rail, Road Track Or Path, and Water layers (select multiple layers by holding the Ctrl key) and drag them into the main Map window.

*We recommend using the latest data schema version for feature types unless you have a specific need to use an earlier one. (See the* [*Data schema versioning page*](https://docs.os.uk/osngd/getting-started/os-ngd-fundamentals/data-schema-versioning) *for more information on data schema versioning in the OS NGD).*

2. Navigate to your area of interest.
3. In the Add OGC API Layer(s) dialog box that pops up:

* Check *Use Spatial Extent.*
* Click *current visible extent* – this will populate the selected extent section with the coordinates for the current extent.
* Click *OK.*

*The four data layers should appear in the Contents pane and on the map, for the current extent only.*

### Filtering data

{% hint style="info" %}
**Why are filters needed?**

* The Land, Rail, and Road Track Or Path Feature Types include both manmade and natural features. You can filter on the OS Land Cover Tier A attribute to select just the feature types used in this recipe, so that only features that have one of the natural land cover values will be included in the data. More information on the OS Land Cover Tier A attribute values is available from the [Land Cover Tier A Value Code List](https://docs.os.uk/osngd/code-lists/code-lists-overview/landcovertieravalue).
* A filter is also required on the Water Feature Type on the Description attribute to filter out areas of tidal water that are considered part of the sea; thus leaving inland water features (for example, rivers, ponds, lakes or reservoirs) plus tidal water in river estuaries and sea lochs that can be considered as an amenity.
  {% endhint %}

#### **Land**

1. Right-click the *Land layer* in the contents pane, navigate to *Properties* > *Definition Query*.
2. Click *+ New definition query.*&#x20;

*This should take you to a query builder window. A query can be built in two ways: using the in-built query builder or using a SQL expression.*

**Query builder**

1. In the Where clause, which is created by default, select *oslandcovertiera* from the *Select a field* dropdown.
2. In the next dropdown, select *includes the value(s).*
3. In the final dropdown, which should now be a multiple response field, check *Mineral*, *Multiple*, *Open Vegetation,* and *Open Vegetation And Mineral*. If any values do not appear, it may be because they do not appear in your area of interest.
4. Click *Apply*, then *OK.*

**SQL expression**

1. In the query builder window, click the *SQL Editor* slider.
2. Enter the following into the expression text box:&#x20;

   ```
   oslandcovertiera IN ('Mineral', 'Open Vegetation', 'Open Vegetation And Mineral', 'Multiple')
   ```
3. This method has the benefit of being able to include all values we want to filter by, even if they do not appear in the area of interest.
4. Click *Apply*, then *OK.*

#### **Rail**

1. Right-click the *Rail layer* in the contents pane, navigate to *Properties* > *Definition Query*.
2. Click *+ New definition query.*&#x20;

*This should take you to a query builder window. A query can be built in two ways: using the in-built query builder or using a SQL expression.*

**Query builder**

1. In the Where clause, which is created by default, select *oslandcovertiera* from the *Select a field* dropdown.
2. In the next dropdown, select *includes the value(s).*
3. In the final dropdown, which should now be a multiple response field, check *Mineral*, *Open Vegetation,* and *Trees*. If any values do not appear, it may be because they do not appear in your area of interest.
4. Click *Apply*, then *OK.*

**SQL expression**

1. In the query builder window, click the *SQL Editor* slider.
2. Enter the following into the expression text box:&#x20;

   ```
   oslandcovertiera IN ('Mineral', 'Open Vegetation', 'Trees')
   ```
3. This method has the benefit of being able to include all values we want to filter by, even if they do not appear in the area of interest.
4. Click *Apply*, then *OK.*

#### **Road Track Or Path**

1. Right-click the *Road Track Or Path layer* in the contents pane, navigate to *Properties* > *Definition Query*.
2. Click *+ New definition query.*&#x20;

*This should take you to a query builder window. A query can be built in two ways: using the in-built query builder or using a SQL expression.*

**Query builder**

1. In the Where clause, which is created by default, select *oslandcovertiera* from the *Select a field* dropdown.
2. In the next dropdown, select *includes the value(s).*
3. In the final dropdown, which should now be a multiple response field, check *Mineral*, *Open Vegetation, Trees,* and *Water*. If any values do not appear, it may be because they do not appear in your area of interest.
4. Click *Apply*, then *OK.*

**SQL expression**

1. In the query builder window, click the *SQL Editor* slider.
2. Enter the following into the expression text box:&#x20;

   ```
   oslandcovertiera IN ('Mineral', 'Open Vegetation', 'Trees', 'Water')
   ```
3. This method has the benefit of being able to include all values we want to filter by, even if they do not appear in the area of interest.
4. Click *Apply*, then *OK.*

#### Water

1. Right-click the *Water layer* in the contents pane, navigate to *Properties* > *Definition Query*.
2. Click *+ New definition query.*&#x20;

*This should take you to a query builder window. A query can be built in two ways: using the in-built query builder or using a SQL expression.*

**Query builder**

1. In the Where clause, which is created by default, select *description* from the *Select a field* dropdown.
2. In the next dropdown, select *is not equal to.*
3. In the final dropdown, which should now be a multiple response field, check *Sea.* If any values do not appear, it may be because they do not appear in your area of interest.
4. Click *Apply*, then *OK.*

**SQL expression**

1. In the query builder window, click the *SQL Editor* slider.
2. Enter the following into the expression text box:&#x20;

   ```
   description <> 'Sea'
   ```
3. This method has the benefit of being able to include all values we want to filter by, even if they do not appear in the area of interest.
4. Click *Apply*, then *OK.*

*This method provides all open vegetation, mineral, trees, residential garden and inland water areas for your area of interest. The data can be further filtered to meet your use cases (supported by* [*data structure*](https://docs.os.uk/osngd/data-structure/data-structure-information) *and* [*code list*](https://docs.os.uk/osngd/code-lists/code-lists-overview) *documentation) by finding the desired layer in the Contents panel, navigating to Properties > Definition Query and amending the expression, filtering the data to meet your needs.*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.os.uk/more-than-maps/using-os-mapping-apis/accessing-greenspace-data-using-os-ngd-api-features.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
