The metadata support in GRASS GIS was seriously improved with the introduction of a new metadata management tool back in 2014 during the Google Summer of Code of that year. The addon added tools for metadata management according to ISO 19115 for GRASS 7.1 users.
During the Google Summer of Code 2015 the plugin has been further developed, and now include various command line and GUI tools. These include the modules r.info.iso, v.info.iso and t.info.iso, which allow you to convert native metadata created with r.info, v.info or t.info into ISO based metadata, and the g.gui.metadata which offers advanced GUI tools for management of metadata. In addition, there is a module for searching and browsing metadata catalogues (g.gui.cswbrowser) and, for advanced users, a number of modeles for establishing and handling pycsw server (db.csw.admin, db.csw.run and db.csw.harvest).
I will have a look at those more advanced modules later, but in this post I want to quickly highlight one very welcome new feature in the main GUI tool metadata management; the option to export your metadata in PDF format.
First you have of course to fill in the metadata information. See this post for a quick overview, or this wiki page on the GRASS GIS wiki for a detailed explanation. Next you can export the metadata as a PDF file using the PDF button in the toolbar. It is actually difficult to miss this button, but I have encircled it in any case in the screenshot below for good order 😉
By default the pdf will be saved in the metadata folder in your GRASS GIS database. For example, if the data layer is in the mapset redlist in the location latlon in the GRASS GIS database GRASSdb, the metadata is stored in: ~/GRASSdb/latlon/redlist/metadata. But you can store it in any location if you prefer.
After saving the file, you’ll be asked if you want to open the pdf file. Below as screenshot of the first two pages of a metadata file I just created.
In the current version there is a small problem with the addon not being able to find the logo, resulting in an error message when trying to export as PDF. I am sure this will be solved soon. In the meantime, a temporary solution is to create your own logo (which should be a png with the dimensions 57 x 73) and save it as logo_variant_bg.png in the folder ~/.grass7/addons/etc/wx.metadata/config. If your logo has different dimensions, you will have to edit the python file ~/.grass7/addons/etc/wx.metadata/mdlib/mdpdffactory.py. Look for the two lines below (around line 140)
logo_path = os.path.join(logo_path,'logo_variant_bg.png') self.doc.add_image(logo_path, 57, 73, LEFT)
If the name of your file is different, change the file name in the first line. In the example below I have changed it to spatialdynamics.png in line 140. If the dimensions of your logo differ, you can change them in the second line. My image is 292 x 75, so I set those dimensions in line 141 the example below.