Skip to content

GIS administrator#

Installation#

Database#

The plugin is using a schema in PostgreSQL.

Warning

With the administration project, it's only possible to add metadata for tables which are stored in the same PostgreSQL database. For now, it's not possible to reference tables which are stored in another database. The use of the foreign schema might work but has not been tested yet.

Administration project#

The GIS administrator can generate a QGIS project using create metadata project. You need to open the generated project and use the normal QGIS editing tools.

In the group called Information Warnings :

  • Orphan metadata displays table not existing in the database itself, but the metadata exists in the dataset table.
  • Orphan tables is the reverse. It displays tables existing in the database but in the dataset table.

Editing metadata#

Before creating metadata for your layer/table, you need to implement some table. To edit this table you need to open the attribute table, switch on Edition mode and add a new row.

Switching to edit mode:

Attribute table

Adding a new row:

Attribute table

Switching to the form view: You can access the form view in the bottom right corner of the attribute table.

Attribute table

  1. On the Theme table you can add many theme corresponding to different theme of your layers. You need to enter a code e.g. "A01", and a label corresponding at the name e.g. "Naturals area". Example adding theme:

    Attribute table

  2. On the Contact table you can add contacts that can later be associated with your metadata layer. Example new contact:

    Attribute table

  3. The Dataset table is the metadata table. You can add many rows and one added line corresponds to a metadata of a layer. You need to fill a row with these minimum information :

    • Table name,
    • Schema name,
    • Title,
    • Abstract,
    • Etc

    Example to add a new metadata for a layer: On the second picture you can see the theme.

    Attribute table

  4. Now you can add a contact to a dataset row with the Dataset table. You can click on a tab called contact. You need to allow edit mode in this tab because you implement another table. Example:

    Attribute table

  5. You can add someLink to a dataset row with the Dataset table. It's same that to add a contact, you have a link tab. Don't forget to allow edit mode. Example:

    Attribute table

When you stop editing a table, don't forget to save your change with clicking on the save icon et leave the edit mode. To save:

Attribute table

To leave the edit mode you need to click on the same button that to enter the edit mode.

HTML Template#

Principle#

The metadata panel is showing all information using HTML templates. These are stored in the database itself. The layer named html_template is displayed in the legend in the administration project.

There are 3 rows in the table :

  • One template for the metadata sheet without contacts and links.
  • One template for a single link.
  • One template for a single contact.

These last two templates will be generated many times for each link and incorporated in the first template.

Edit or translate these templates#

You can customize the HTML template by opening the attribute table of that layer and switching editing mode. Either you might want to translate some hardcoded strings in the HTML or you want to change the HTML layout.

  • Use [% "name_of_field" %] to display a specific field, eg abstract.
  • use [% meta_contacts %] to display all contacts related. It's using the template called contact.
  • use [% meta_links %] to display all links related. It's using the template called link.

Tip

If you want to reset to default the HTML templates, you can use the Processing algorithm in the toolbox.

Tip

Check the video tutorial at 13 minutes 05 secondes covering the HTML templates.