Skip to content

QGIS data publication

Reference

Read more on GeoCat Bridge for QGIS

QGIS Bridge Plugin

GeoCat Bridge is an extension for QGIS. GeoCat Bridge enables you to publish the layers from an QGIS map project to GeoServer or MapServer as OGC Web Services (WMS/WFS/WCS) and publish the metadata of layers to the GeoNetwork opensource catalog.

So what does this mean? Let's say you have a map project in QGIS and you want to publish the layers of this project as online OGC services in Geoserver. To do this manually, you would have to:

  1. Convert the QGIS symbology to OGC:SLD (Styled Layer Descriptor) and configure these styles on layers created in Geoserver
  2. Export and upload the datasets to the server
  3. Upload the metadata of the datasets into GeoNetwork
  4. Configure the linkage between Geoserver layers and metadata

By using GeoCat Bridge the above steps are managed by Bridge by the click of a button.

Besides publishing the maps to GeoServer or MapServer, Bridge will also publish metadata of your datasets to a geospatial catalogue. When publishing metadata to a catalogue Bridge will convert the QGIS metadata to ISO19139 format and upload it to the catalogue.

When publishing both metadata to a catalogue and layers to a map server, Bridge will update the metadata to include in the metadata the URL of the map service the layer is published in. So when searching for the dataset in your catalogue you can also find the map service. At the same time Bridge also adds the url of the metadata to the layer in the map server. So the capabilities document will contain the url of the metadata for that layer.

Download and Configuration

Download and install GeoCat Bridge.

  1. The latest version can be found at the GeoCat website: https://my.geocat.net/download

  2. More information: Installation

Configure Servers

In order to publish your data you have to configure the target servers.

  1. Change to the GeoCat page, and to fill in your GeoCat live name to confirm the instance is accessible.

    GeoCat Live Running GeoCat Live Running

    This does not check your ability to login, it is intended to confirm the web services can be used by QGIS and is helpful to identify any VPN or Firewall restrictions preventing access.

  2. Change to the Servers page, to add your GeoCat Live services for publication.

    Use the GeoCat Live option, and fill in the connection details for the GeoServer and GeoNetwork services.

    QGIS Bridge Servers QGIS Bridge Servers

  3. More information: Server Configuration

Publication

There are two options to store uploaded datasets on the server:

  • File Upload

    The default publishing scenario is to upload the datasets over HTTP as files to the server, and store the datasets as files on the server.

    The file format used to upload are:

    • GeoPackage for vector data
    • GeoTIFF for raster data
  • PostGIS

    An alternative approach is to use a direct PostGIS connection. Requirement for this is that Bridge can make a direct connection to the Postgres/PostGIS database.

    In order to do this you will need to create a PostGIS datastore connection in QGIS and select that datastore in the connection settings panel.

    PostGIS Database PostGIS Database

    When you publish with direct PostGIS connection, Bridge will export the data and store it directly in the PostGIS database. Raster layers continued to be uploaded as GeoTIFF.

Steps for publishing a layer:

  1. Create an QGIS project using a vector data source (such as a GeoPackage or Shapefile), and introduce some styling for your layer.

    QGIS Project QGIS Project

  2. You can now start the publication process by opening the Publish window from the web menu or the Bridge icon on the toolbar.

    GeoCat Bridge Publish menu GeoCat Bridge Publish menu

  3. The Bridge window consists of 2 parts. On the left the list of layers from the Table Of Contents is displayed. When a layer is selected, layer details (metadata) is displayed at the right side. At the bottom are some publication options.

  4. Evaluate or complete the metadata for the dataset. This metadata will be used in the WMS GetCapabilities response as well as to register the dataset in a catalogue (if configured).

    • Select each layer in the Table of Contents and evaluate or complete its metadata.

    • The three icons on the top of the panel enable you to: view the complete metadata, run a validation and import existing metadata (to import bundled metadata which may be available in the datafile.)

      Metadata Metadata

    • QGIS stores its layer metadata in the project file, so any changes to metadata will be persisted when you save your project.

  5. The Bridge Metadata panel displays a minimal set of metadata properties required to create a valid iso19139 metadata record. If you need more advanced and detailed editing of metadata you can open the QGIS metadata editor.

    Read more...

    For more detailed information about validation and using profiles: Metadata Editing.

  6. The data tab behind the metadata panel allows to view and disable fields to be published.

  7. The panel at the bottom of the window is used for defining the publication. You can select to which map server and/or catalogue the datasets will be published.

  8. Press Publish to publish to the servers.

    Publishing progress Publishing progress

    Note

    On some operating systems this dialog has a habit of being shown behind the main qgis window.

  9. The Publish result screen will show the result of the publication.

    • Double click any error or warning to display more details.
    • Notice the blue icons in the layer list, indicating the publication status of that layer.
    • Right click on a layer and from the context menu open the published metadata record or a preview of the map service.
  10. Bridge has an option to publish data to a local GeoPackage.

    The Package will contain data, metadata, SLD and Context (layer hierarchy). Style and context are not part of the GeoPackage standard, but introduced as part of the OWS-Context GeoPackage extension.

    Offline publication Offline publication

Workspace and projects

For each QGIS project Bridge will create a GeoServer Workspace or Mapserver Mapfile.

At any moment you can reopen the project, add or remove layers and publish it again replacing the layers on the server with the latest configuration.

  • Notice that Bridge will also persist the layer hierarchy of your original project on the server.
  • If you've not saved a new project, Bridge will throw a warning, because it needs the name of the project.
  • Notice that any entered project properties will be persisted on the server as project metadata for the workspace.