Using your XMAP layers in QGIS

Using your XMAP layers in QGIS

Overview

For customers who have a dedicated database connected to XMAP, you can access your data directly in QGIS. This means that both XMAP and QGIS are reading from the same source, so there is no risk of multiple versions of your data existing in your organisation.

Getting Started

For any user needing to access the database, you will need to create a user. You can do this from XMAP, or using a database tool such has DBeaver or pgAdmin.

QGIS Authentication

We recommend using the authentication manager to create a named configuration for XMAP. In QGIS, go to: Settings -> Options -> Authentication
  1. Click the green + symbol to create a new configuration.
  2. Enter a name for the configuration
  3. Click the orange padlock symbol to unlock the 'id' field
  4. Enter xmapdbu as the ID
  5. Select Basic Authentication from the drop down
  6. Enter your username and password for the database user.

Connect to the Database

  1. Open the datasource manager: 
  2. Select PostgreSQL
  3. Click New
  4. Enter a name for the connection
  5. In the Host field, enter the connection URL. If you do not know this, contact support.
  6. In the database field, enter the name of the database to connect to.
  7. Under Authentication, click the drop down and select the configuration you created for XMAP.
  8. Select 'Also list tables with no geometry'
  9. Click OK to save
  10. Click 'Connect' to connect to the database. 
  11. You can then browse the database schemas and tables and select a table to 'Add' to the QGIS view.

Troubleshooting

You must select a table in order to add a layer

If you see this message when trying to add a table, you may need to tell QGIS what the geometry type is of the layer. In the datasource manager, find the table and scroll across to the Spatial Type column. Try selecting a Geometry Type and clicking Add:

I've added my layer to QGIS, but it isn't showing, there's a warning symbol next to the layer or the layer doesn't seem to have a geometry type.

See above. This layer may be using a generic geometry type. You can use the data source manage to tell QGIS the geometry type of the layer, or add a feature to the layer using XMAP and refresh the QGIS connection.

    • Related Articles

    • Make new Map Layers appear in the Layer Control

      Overview XMAP's Admin Panel has a hierarchical system that gives you great control over the layers that are visible to your users. This is covered in the following articles: Profiles Collections Layers However, it may not be completely obvious when ...
    • Database Manager

      Overview The Database Manager is made available if your organisation has 1 or more dedicated (private) PostgreSQL databases linked to it. It exposes administration functionality for you to manage your database at a high level without the need to ...