Jelix module for Lizmap, which adds tools to show layers metadata created with PgMetadata

0.2.4 2021-03-31 10:00 UTC

This package is auto-updated.

Last update: 2022-06-07 11:19:48 UTC


Lint JS 🎳 Lint PHP 🎳 Release 🚀 Packagist

This module is designed for Lizmap Web Client, and allows displaying PostgreSQL layers metadata stored in the layer database.

The metadata must be created in the PostgreSQL database as designed in the PgMetadata QGIS plugin.

Metadata information panel


Once Lizmap Web Client application is installed and working, you can install the pgmetadata module:

Since version 0.2.4, it is recommended to install the module with Composer, the package manager for PHP. If you can't use it or if you are using Lizmap 3.3 or lower, use the manual way to install the module (jump to the corresponding section below)

Automatic installation with Composer and lizmap 3.4 or higher

  • into lizmap/my-packages, create the file composer.json (if it doesn't exist) by copying the file composer.json.dist, and install the modules with Composer:
cp -n lizmap/my-packages/composer.json.dist lizmap/my-packages/composer.json
composer require --working-dir=lizmap/my-packages "lizmap/lizmap-pgmetadata-module"
  • Then execute Lizmap install scripts into lizmap/install/ :
php lizmap/install/installer.php

Go to the next section "Publish your metadata as a DCAT catalog".

Manual installation into lizmap 3.3 or 3.4 without Composer

  • Get the last ZIP archive in the release page of the GitHub repository.
  • Extract the archive and copy the pgmetadata directory in Lizmap Web Client folder lizmap/lizmap-modules/
  • Edit the config file lizmap/var/config/localconfig.ini.php and add into the section [modules]:
  • Then execute Lizmap install scripts into lizmap/install/ :
php lizmap/install/installer.php

Publish your metadata as a DCAT catalog

If you need to publish your metadata catalog as an RDF catalog, for example to be harvested by a third-party metadata platform such as Ckan, you need to declare in the file lizmap/var/config/profiles.ini.php a new section [jdb:pgmetadata] with the needed credentials to your PostgreSQL database hosting the metadata. For example:


Then, you would be able to access the following URLs

  • The full RDF catalog with a URL like: https://[YOUR_LIZMAP_URL]/index.php/pgmetadata/dcat/
  • One dataset record by UUID identifier with: https://[YOUR_LIZMAP_URL]/index.php/pgmetadata/dcat/?id=76853e57-387e-4b8d-9ee8-f176e11cd9ce
  • Filter datasets containing a specified keyword (exact match): https://[YOUR_LIZMAP_URL]/index.php/pgmetadata/dcat/?q=akeyword

The XML created and returned would be like:

<?xml version="1.0" encoding="UTF-8"?>
<dcat:Catalog rdf:about="">
    <dct:description>PgMetadata DCAT RDF catalog</dct:description>
      <dcat:Dataset rdf:about="http://lizmap.localhost/index.php/pgmetadata/dcat/?id=76853e57-387e-4b8d-9ee8-f176e11cd9ce">
        <dct:title>Test title</dct:title>
        <dct:description>Test abstract.</dct:description>
        <dct:license>Licence Ouverte Version 2.1</dct:license>
        <dct:created rdf:datatype="">2020-12-31T09:16:16.980258</dct:created>
        <dct:issued rdf:datatype="">2020-12-31T09:16:16.980258</dct:issued>
        <dct:modified rdf:datatype="">2020-12-31T09:16:16.980258</dct:modified>
            <vcard:fn>Jane Doe - Acme (GIS)</vcard:fn>
            <vcard:hasEmail rdf:resource="jane.doe@acme.gis">jane.doe@acme.gis</vcard:hasEmail>
            <foaf:name>Jane Doe - Acme (GIS)</foaf:name>
            <foaf:name>Bob Robert - Corp (Spatial div)</foaf:name>
            <dct:title>test link</dct:title>
            <dct:description>Link description</dct:description>
            <dct:format>a file</dct:format>
        <dcat:theme>test theme</dcat:theme>
        <dcat:theme>New test theme</dcat:theme>

Contribution guide

For PHP, the project is using PHP-CS-Fixer. For JavaScript, it's using ESLint. Install it using npm install.

There are commands in the Makefile to run them.

Getting help