Accessing GeoNode content from external applications

“GeoNode provides standards compliant data services, so that external applications can interact with data stored on the GeoNode platform”

GeoNode provides remote access to resources stored on the platform, so that its content may be utilized from external applications. By using GeoServer as a backend service, GeoNode is able to provide OGC compliant services for all data sources. This module will focus on interacting with these services using QGIS.

GeoNode uses CSW as a cataloging mechanism to query and present available geospatial metadata. Other tools can then interact with GeoNode instances using the CSW standard. In QGIS one such tool is Metasearch. MetaSearch is a QGIS plugin to interact with metadata catalogue services, supporting the OGC Catalogue Service for the Web (CSW) standard. This plugin provides an easy and intuitive approach and user-friendly interface to searching metadata catalogues within QGIS.
GeoNode is based on CSW (Catalogue Service for the Web) specification, which defines common interfaces to discover, browse, and query metadata about data, services, and other potential resources.

GeoNode uses pycsw as the default CSW server. Other CSW server implementations are:

  • GeoNetwork
  • deegree

These backends can be configured as an alternative to the CSW backend in GeoNode.

When using a tool like MetaSearch tools with login, it simulates the permissions for all layers that are visible to you in GeoNode. When accessing the CSW service without login credentials you see public layers (layer with no access restrictions) in GeoNode.

You try:

Goal: To explore GeoNode data in QGIS using various tools available in QGIS

Exercise 01: Adding remote service data to QGIS with MetaSearch

  • Activate the MetaSearch tools plugin from the QGIS plugins menu. This plugin is installed by default and should not need to be downloaded
  • Open the MetaSearch tool dialog under the web menu
  • Click Add Default Services
  • Choose the service Danmark: National CSW (geodata-info) from the available service drop-down menu
  • Click on Service Info to view the service details.
  • Select the GetCapabilities Response. The request should produce a document that has a list of all available layers and their extents
  • Click on the Search Tab in the MetaSearch interface
  • Type in the name of a service in the keywords dialog (e.g. 'boundary' or 'zone'). Leaving the keywords empty will return a full list of all available services and documents
  • Select a service from the listed layers to highlight the service
  • Use the Add Data drop-down to select the service type you would like to consume (e.g. WFS)
  • A service connection should be created automatically and the interface should provide options for selecting available layers to add to the project. Be sure to select the Edit option and give it a more meaningful name
  • Multiple layers may be selected by holding the ctrl key when selecting layers
  • Use Add to consume the select layers from the remote service and add them to your local project

Note that WFS and WCS are sometimes slow because they may depend on the size of the image being accessed from the remote service

Exercise 02: Adding remote service data from GeoNode to QGIS

  • Open the MetaSearch tool dialog
  • Establish a new connection under the Services tab by clicking New. Enter a name for the service, your GeoNode site URL, and supply your credentials for the connection
  • Note that your site URL must be the full URL for the CSW service, e.g. http://geonode.domain.tld/catalogue/csw?service=CSW&version=2.0.2&request=GetCapabilities
  • Test the service is working correctly by using the Service Info and GetCapabilities features
  • Click on the Search tab on the MetaSearch interface and press the Search button to list the available datasets
  • Add your data using the relevant service type.
  • Note that with the correct permissions settings and configuration, WFS services will allow users to directly edit features using the QGIS Desktop tools and synchronize saved changes to the remote service

Check your results

Were you able to add a default remote service? Did you try to test the differences between WMS and WFS services?
Did you manage to successfully connect to your GeoNode instance? Try testing the edit functionality, either by modifying a feature geometry or by updating a layers attribute table.
Did you notice how the connections created by MetaSearch became available within the QGIS Browser interface if you use the refresh button?

Name Expectation

OGC connector

MetaSearch

Site URL

http://geonode.com/csw

Layer

Name of layer available in GeoNode

OGC services

WFS/ WMS/ WCS

QGIS tools

Field Calculator, Digitising

More about interacting with GeoNode using remote services

CSW is a powerful and convenient way for users to discover and interact with geodata from external applications, however, there are other options available for interacting with data stored in GeoNode. Because GeoNode utilizes GeoServer and PostGIS as backend services, advanced configuration is possible whereby experienced system administrators can expose the data stored in GeoNode via any available GeoServer service, or even allow users to interact directly with data stored within the database. The caveats with this implementation are primarily that the permissions managed in GeoNode will not be respected through these channels.

GeoNode can also be accessed directly using the GeoNode connector available from the QGIS Browser Panel, however, this does not currently support authentication.

A more direct way of interacting with GeoNode data is to access layers directly via the WMS or WFS connectors in QGIS, which can be accessed from the browser panel. Simply set up a new connection and add the relevant service address, e.g. http://geonode.domain.tld/geoserver/ows. These connections are identical to the connections created by the MetaSearch plugin, with the caveat that the MetaSearch tool allows the search and discovery of data based on metadata attributes, whereas these connections expect users to be able to identify the relevant layer data using the layer name only.

In order to authenticate with external applications such as QGIS, which will ensure that the access and editing permissions configured in GeoNode are respected, GeoNode will need to be configured with an OAuth key, which is a cryptographically secure authentication mechanism. Configuration of OAuth will require the assistance of a system administrator and is covered further in the GeoNode documention https://docs.geonode.org/en/master/usage/other_apps/qgis/

Check your knowledge:

  1. What kind of OGC service do you use if you need to edit the raster:

    1. WFS allows me to edit the properties of the raster and any changes are then pushed to GeoNode
    2. WCS allows me to edit the properties of the raster and any changes are then pushed to GeoNode
    3. The raster cannot be edited in QGIS, you need to re-upload the raw raster in GeoNode after making your modifications
  2. What is produced when you click service info in MetaSearch and what details does it contain:

    1. It produces the layer which can be loaded directly into QGIS
    2. It produces a list of all the available layers in GeoNode and the links to access them
    3. It produces a list of all geospatial data available in GeoNode excluding documents
  3. Why is it desirable to put your username,password when setting up connection endpoint in MetaSearch:

    1. It allows access to layers with restricted access from the GeoNode
    2. It is not important because the number of layers visible still remains the same