venerdì 3 ottobre 2014

A new tool for (INSPIRE) metadata management in GRASS GIS

For those who deal with geospatial data and GRASS GIS, and need to fulfill the requirements of the INSPIRE directive for metadata, one of the most exciting outcomes of the Google Summer of Code 2014 [1] is the INSPIRE metadata support developed by Matej Krejci. This is the first step towards full metadata management through GRASS, and covers the editing part.

Purpose


The module allows to create / load / edit / export / validate xml metadata with (currently) two profiles:
  • Basic GRASS profile
  • INSPIRE profile
You can select either of them in the drop-down menu on the top left corner.

Metadata map editor


In the radio button on the top left corner, you can select either Metadata map editor or Metadata external editor. The former will modify the metadata of the maps currently present in the mapset. You can visualize them in the tree on the left hand side.





Working directory


The working directory (workdir button on the top right) is where you wish your metadata to be saved, or where you want to browse metadata from (in case you are using the Metadata external editor). The default setting is a folder called metadata stored in the current mapset.

Editing the metadata


Select the map you wish to create the metadata for. Selecting Edit will open your metadata. You will notice that some of the fields are already filled. These information, such as the date of creation, resolution and so on and so forth, are reported as detected by GRASS. You can always modify them though. 




Validation


Once your metadata is complete, you can validate it against the INSPIRE requirements, pushing the Validate button at the bottom. If you haven't filled some of the fields properly, like in this example, you will get a series of error that need to be fixed in the various tabs of the editor.





Requirements


The module wx.metadata requires GRASS 7.1 and has external dependencies:
  • OWSLib development version
git clone git://github.com/geopython/OWSLib.git
cd OWSLib && sudo python setup.py install
  • Jinja templates
git clone git://github.com/mitsuhiko/jinja2.git
cd jinja2 && sudo python setup.py install

Installation


GRASS> g.extension wx.metadata

Launch it as:

GRASS> g.gui.metadata

Notes


[1] Google Summer of Code is the program with which Google supports Open Source software, and encourages students to join and start contributing to open source communities. In fact, students selected by mentors from OS organizations, are paid a stipend to develop a project that has been identified by the community. During the "summer of code", students are constantly supported by their mentors and the OS community. OSGeo, the Open Source Geospatial Foundation, has been participating to GSoC since 2007. OSGeo serves as an umbrella organization for several OS Geospatial projects.