> 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-topographic-features/town-and-city-planning-looking-at-facilities-and-access-to-natural-areas-and-environment.md).

# Town and city planning looking at facilities and access to natural areas and environment

This how-to guide demonstrates how to identify the level of access to natural areas from existing residential and commercial addresses. It shows you how to use QGIS to standardise the geometry of datasets you've downloaded and, if required, standardise the data into one layer using common attributes.​

This guide follows on from the [town and city planning recipe guide](https://docs.os.uk/osngd/getting-started/downloading-with-os-select+build/getting-started-with-os-recommended-recipes/town-and-city-planning-recipe-guide); that recipe guide gives you step-by-step instructions on how to select relevant pieces of addressing, administrative and statistical units, buildings, geographical names, land use and water data from the OS National Geographic Database (OS NGD) and weave them into a recipe to help you identify the level of access to natural areas from existing addresses, both residential and commercial.

Before starting the how-to guide on this page, we suggest you:

1. Create your town and city planning recipe in OS Select+Build (following the instructions in the [town and city planning recipe guide on the OS NGD Docs site](https://docs.os.uk/osngd/getting-started/downloading-with-os-select+build/getting-started-with-os-recommended-recipes/town-and-city-planning-recipe-guide))
2. [Add a data package to your recipe](https://docs.os.uk/osngd/getting-started/downloading-with-os-select+build/getting-started-with-data-packages) (where you can select the format, update frequency and area of interest for the required data)
3. [Download your data package](https://docs.os.uk/osngd/getting-started/downloading-with-os-select+build/getting-started-with-data-packages#how-do-i-find-and-download-an-existing-data-package)
4. [Load your dataset into QGIS](https://docs.os.uk/osngd/~/changes/2021/getting-started/downloading-with-os-select+build/getting-started-with-geopackage/qgis)

### Identifying natural areas

To help with this example, we have provided an image of the options chosen in QGIS. You'll notice that some of the layers overlap; this is referred to as 'nesting' and it allows for multi-function site separation.

<figure><img src="https://3774974716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzIfdYInJITdcxaLLMhlD%2Fuploads%2FLWkHpIXR4nNl4n5hJl0O%2FT%26CP%20image%2012.png?alt=media&amp;token=150fa2f7-8d80-4a6a-882f-2f309f1ae96d" alt="Image shows QGIS and the layers selected for the example"><figcaption><p>QGIS UI with the Layer Properties dialog open to show the layers selected for the example.</p></figcaption></figure>

1. To filter the relevant access points from the dataset, highlight the relevant polygons and navigate to *Vector* > *Research Tools* > *Select by Location*.
2. Select the features from *lus fts siteaccesslocation*, tick the boxes that say *intersect* and *touch*. Compare the features from *lus fts site*. Tick the box that says *Selected features only*, then click *Run*.
3. Export the selected features into a new layer by right-clicking the *lus fts siteaccesslocation* layer in the Layers toolbar and navigating down to *Export* > *Save Selected Features As*.
4. In order to preserve the underlying data, we recommend using GeoPackage as your format. Point it at your directory, call it something appropriate and ensure that the right coordinate reference system (CRS) is selected. While automatic geometry type does work, selecting  *geometry as point* avoids any unnecessary issues. Click *OK*.
5. Right-click on the newly created layer, and under *Symbology*, catogorise using the *access\_mode attribution*. Given the nature of the topic, you will want pedestrian access and pedestrian and vehicular access to be displayed on your workspace.

<figure><img src="https://3774974716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzIfdYInJITdcxaLLMhlD%2Fuploads%2FHFDmDR9Aq67cOVHBTby3%2FT%26CP%20image%2013.png?alt=media&amp;token=17770112-6cd3-4fc4-a9e4-0e131e554cb3" alt="QGIS UI with the Select by Location tool selected."><figcaption><p>QGIS UI with the Select by Location tool selected.</p></figcaption></figure>

### Filtering for residential properties

1. To pull out residential and commercial areas, right-click on the *gb builtaddress* layer and click the option for *Filter*.
2. In the Query Builder dialog:
   1. filter the field of *primaryclassificationdescription* using the following equation: *"primaryclassificationdescription"  = 'Residential’.*
   2. Click *OK*.

<figure><img src="https://3774974716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzIfdYInJITdcxaLLMhlD%2Fuploads%2FUMsHkAHUEPEtdCXNjrBG%2FT%26CP%20image%2014.png?alt=media&amp;token=6ac42826-2838-4708-b0d9-1a480a32bc7c" alt="QGIS UI with the Query Builder dialog open and showing the filtering details."><figcaption><p>QGIS UI with the Query Builder dialog open and showing the filtering details.</p></figcaption></figure>

### Identifying distance from access

To provide an assessable and visually impactful report, we are going to produce a heatmap-like output. To do this, first we'll have to create a series of polygon sets at 300m, 600m and 900m wide, representing approximately 5 minutes walk, 10 minutes walk and 15 minutes walk, respectively.

1. Navigate to *Vector* > *Geoprocessing* > *Buffer*.
2. In the Buffer dialog:
   1. Set the *Input layer* parameter to *fts site access points* (filtered for combined and pedestrian access).
   2. Set the *Distance* parameter at *300* and make sure that the units are selected as metres.
   3. Tick the *Dissolve result* tick-box.
   4. Under the *Buffered* parameter, press the three dots and save as a *GeoPackage*.&#x20;
   5. Put the GeoPackage in a working folder where you can find it and name it something sensible. (We have called it Distance in this example.) Then call the layers something distinct. (In this example, we called it 300.)
   6. Click *Run*.
3. Add an attribute called *Distance* to the polygon and make the value *300*.
4. Repeat the process for 600 and 900. For good data hygiene, we suggest it's saved to the same GeoPackage as it can hold multiple layers.

<figure><img src="https://3774974716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzIfdYInJITdcxaLLMhlD%2Fuploads%2FtNWZuLi1TyOH5dB6bRso%2FT%26CP%20image%2015.png?alt=media&amp;token=020b59f9-3d93-4747-a7b1-e25cc076a0b1" alt="Image displaying buffer parameters set in QGIS"><figcaption><p>QGIS UI with the Buffer dialog shown and displaying the selected buffer parameters.</p></figcaption></figure>

The next step is to give the addresses in the area of interest a designation based on their distance from the access to greenspace areas. You need to isolate the rings to improve the readability and to make it easier to provide an attribute based on the ring the address is located in.

5. Navigate to *Processing* > *Toolbox* and search for *Difference*. Set the largest area (900) as your *Input layer* and set your medium layer as your *Overlay layer*. Save it to the same GeoPackage as before and call it something similar but not identical (we called it 900 ring in this example).
6. Click *Run*.
7. Repeat this process, but change the *Input layer* to the 600 polygon and the *Overlay layer* to the 300 polygon.

You've now separated the polygons, allowing underlying features to be visible. Your next task is to attribute the addresses.

8. Use the toolbox to search for *Join attributes by location*.

<figure><img src="https://3774974716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzIfdYInJITdcxaLLMhlD%2Fuploads%2FEBqZwiNjHLhJvCEprwSM%2FT%26CP%20image%2016.png?alt=media&amp;token=5b2149cf-559c-41b7-9a66-1c4fb7f36d7c" alt="GQIS UI showing the 300, 600 and 900m buffers around a series of address points."><figcaption><p>GQIS UI showing the 300, 600 and 900m buffers around a series of address points.</p></figcaption></figure>

9. In the *Join Attributes by Location* dialog:
   1. Set the *Input layer* as your point address and the *join layer* as one of your distance polygons (for example, 900).
   2. In *Geometric predicate*, tick the box for *Intersects*.
   3. In *Fields to add*, tick the *distance attribute you created earlier*.
   4. Under *Joined layer*, create a new GeoPackage and name it something appropriate. Call the layer something distinct (in this example, it is called address 900).
   5. Click *Run*.

<figure><img src="https://3774974716-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzIfdYInJITdcxaLLMhlD%2Fuploads%2FTrM6xmMxAmuwgelmWdkq%2FT%26CP%20image%2017.png?alt=media&amp;token=6fe19ffe-292c-4de5-93b6-bf925890043e" alt="QGIS UI with the Join Attributes by Location dialog open and showing the appropriate settings for an attribute join."><figcaption><p>QGIS UI with the Join Attributes by Location dialog open and showing the appropriate settings for an attribute join.</p></figcaption></figure>

10. Repeat the process for 600 and 300, remembering to name the layers something different.

Congratulations. You now have addresses with their approximate distance from the entrance to greenspace as attribution.


---

# 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-topographic-features/town-and-city-planning-looking-at-facilities-and-access-to-natural-areas-and-environment.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.
