# Viewing the data in QGIS

In QGIS, click on the ‘**open PostGIS layer**’ button on the left hand side of the window.

<figure><img src="/files/uFzFYWo6NaczeQlteOAy" alt="open PostGIS layer’ button " width="54"><figcaption><p>open PostGIS layer’ button</p></figcaption></figure>

<figure><img src="/files/I2QZ51tX2DfR8gNULVam" alt="Add PostGIS Table window showing the new connections button highlighted" width="375"><figcaption><p>Add PostGIS Table window</p></figcaption></figure>

In the next window, a new connection will have to be set up to the newly created database containing the OS OpenMap-Local data. Click on ‘**new**’. Another window called ‘**create PostGIS connection**’ will appear. Information will be required to be entered into this window to set up the new connection.<br>

<figure><img src="/files/eIoFtvAB521TSYAq4eRs" alt="Create a new PostGIS connection window for a local osopenmap database" width="281"><figcaption><p>Create a new PostGIS connection window</p></figcaption></figure>

In this example, the name ‘**osopenmap**’ for the connection has been provided along with the name of the database which holds the data. Click on the ‘**Test Connect**’ button to ensure that the correct connection is made. Once successful, click ‘**OK**’. If the save username and save password boxes have been clicked, click ‘**OK**’ in the subsequent message box.

A new connection will now be available in the list of PostGIS database connections. Ensuring that the correct one is listed, click on ‘**connect**’. The schema containing the OS OpenMap-Local data can be seen.

<figure><img src="/files/I2WQ11EIU00WvI5fv1G3" alt="Add PostGIS Tables window" width="349"><figcaption><p>Add PostGIS Tables window</p></figcaption></figure>

Click on the + sign next to the schema to expand the list of tables. Select all of the tables within OS OpenMap-Local that are required to be loaded to QGIS. Once all have been selected, click ‘**Add**’.<br>

<figure><img src="/files/jc1DFEPMQ1a4mBXybcBa" alt="Add PostGIS table showing available tables within the openmap schema" width="347"><figcaption><p>Add PostGIS Table(s) window</p></figcaption></figure>

The OS OpenMap-Local data will load into QGIS. The data will need to be re-ordered and then styled appropriately using personalised style files or the style files available from GitHub published by Ordnance Survey. If using these published files, please consult the accompanying ‘Quick Start Guide’ as to their use. It should be noted that there is no requirement to add a spatial index to the data from PostGIS as those indexes were added automatically during the loading of the data into PostgreSQL.<br>

<figure><img src="/files/1MRwmNptx1jsoVHOIPpM" alt="OS OpenMap Local data loaded into QGIS in the main data window" width="563"><figcaption><p>OS OpenMap Local data loaded into QGIS</p></figcaption></figure>

If using the published style files, the output should appear as shown above.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.os.uk/os-downloads/products/maps-and-imagery-portfolio/os-openmap-local/os-openmap-local-getting-started-guide/viewing-the-data-in-qgis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
