GIS-LAB

Географические информационные системы и дистанционное зондирование

Working with metadata using Metatools for QGIS

Обсудить в форуме Комментариев — 35Редактировать в вики

Эта страница опубликована в основном списке статей сайта
по адресу http://gis-lab.info/qa/metatools-eng.html


Description of the metadata editing and viewing tool for QGIS.

There are more then 150 plugin for QGIS. The core QGIS functionality is extending very quickly. But until recently it was impossible to work in QGIS with such important information as metadata. It makes work with large datasets less productive as there are no possibility to view or prepare matadata.

Until recently there was only one tool, that allowed to open and partly edit metadata — MetaEdit plugin by Alex Mandel. But its development was stopped about year ago and many features were left unimplemented.

To fix this situation NextGIS developed new QGIS plugin — Metatools, that allows creating, editing and viewing metadata.

We want to thank Linfiniti Consulting for sponsoring development.

Создано в Nextgis.png Разработка открытого ПО ГИС и реализация проектов

Содержание

[править] Installation notes

Plugin is available via GIS-Lab repository.

Metatools was developed for QGIS 1.5.0 or higher. It also requires Qt 4.6.0 or higher and corresponding version of the PyQt, in addition you need GDAL library with Python bindings. Windows users can get all necessary stuff via standalone QGIS installer or via OSGeo4W installer.

You can obtain sources from our SVN:

git clone https://github.com/nextgis/metatools

[править] How does it work

After installation plugin will create two toolbars and add submenu in the "Plugins" menu.

Metatools-01.png
Metatools-02.png

The plugin allows you to create, view and edit metadata in ISO19115/ISO19139 and FGDC standards. Support of other standards such as Dublin Core, will be available in future versions. Contributors and sponsors are welcome.

Both vector (currently only shapefiles) and raster data are supported. If layer doesn't have any metadata, plugin will create it on first access attempt using selected profile.

[править] View metadata

Metatools-03.png

Viewing metadata is implemented via translating it into html-representation. This makes it easy to change the appearance of the output just by editing the XSLT conversion file. Conversion files are stored in the xsl directory of the plugin folder, for example in ~/.qgis/python/plugins/Metatools/xsl/. To edit these files you need only basic knowledge of the XSLT language and your favorite text editor. Here how standard appearance looks:

Metatools-04.png

You can copy all or only selected metadata from context menu, and then paste it as plain text or HTML into another editor. Also from this menu it is possible to print metadata.

[править] Edit metadata

Metatools-05.png

Metadata editor has two modes: displaying full metadata tree ("Full view"):

Metatools-06.png

and displaying only favorite nodes ("Filtered view"):

Metatools-07.png

Filtered approach allows quick editing of some predefined nodes (for example, the filter can be used for quick access to the most used fields), and modify all other fileds by searching them in full tree.

You can create as many filters as you need, current filter can be selected in the plugin settings. Filter definition is stored as plain text, so to create new filter you should create new text file and fill it with necessary node path (one node in each line). Here is an example:

MD_Metadata -> fileIdentifier
MD_Metadata -> contact -> CI_ResponsibleParty -> individualName
MD_Metadata -> contact -> CI_ResponsibleParty -> organisationName

To find node path: open editor in «Full view» mode, select necessary node and in right side above edit area you will see full node path. You can copy it to clipboard from context menu.

This path (except type identifier) will be desired filter line. For example, node path may look like this:

MD_Metadata -> dateStamp -> gco:Date

the last part (gco:Date) — is a type indentifier, and should be ommited. So, in the filter file you should paste this string:

MD_Metadata -> dateStamp

When you finished, save file where you want and in settings dialog select it as "Filter file".

Metatools-08.png

You can find sample filter file in the filter folder.

To edit a node, select it in the left side of the editor window, node value will be displayed in the "Edit value" field in the right side of the window, where you can change it. Pressing the "Apply" button will update metadata. To undo your edits press "Discard" button. Warning! All changes are stored in memory, to save edits on disk you need to press "Save" button.

Please remember that entered values are not checked for the accordance with the standard schema because of limitations of the development platform. Hope this will be fixed in future releases.

[править] Apply templates

Metatools-09.png

For the convenience of preparing metadata for a large number of layers plugin provides a template mechanism. Once filling information about institution, license, workflow and data type you can apply this information to several layers at once.

Note: currently templates works only with metadata in ISO19115 format, support of the FGDC standard is upcoming.

Metatools-10.png

You can create as many templates as you need, to manage templates press "Manage" button

Metatools-11.png

All templates are stored in the subfolders of the templates folder under plugin path.

After applying, information from template will be saved in the metadata file in accordance with the standard.

In addition to applying templates to the layers in layers list, it is possible to apply templates to the external datasets without loading them in QGIS. To do this check "Select files from disk" checkbox and select necessary files.

Metatools-12.png

If you want you can extract some information about data such as extent, bands number, data type, minimum and maximum value for each raster band automatically. This feature can be activated by checking "Extract layer parameters to metadata XML". Also when processing raster data it is possible to generate previews in user defined format (you can change it in plugin settings). To enable this activate "Generate preview image" checkbox.

If you have some processing logs, you can embed them into metadata. To do this select log file from disk and plugin will add it to the metadata of all layers or files.

[править] Metadata import and export

Metatools-13.png
Metatools-14.png

Import tool allows to load layer metadata from existing metadata file (usefull when layers have similar metadata). Export tool allows to save layer metadata in the separate file with any name.

[править] Validate metadata

Metatools-15.png

This tool is used for metadata file validation (checking for compliance with selected standard). It is under development and currently supports only FGDC standart and produces ugly and mainly nonreadable reports.

Metatools-16.png

[править] Working with FGDC

Since several functions for complete FGDC support are still unimplemented we've include two external tools: USGS Tkme — editor for FGDC metadata by Peter N. Schweitzer and mp — metadata validator. These tools can be accessed using toolbuttons:

Metatools-17.png
USGS Tkme
Metatools-18.png
mp

This utilities will help you edit metadata documents according with the FGDC requirements and validate existing metadata files. You can run them directly from QGIS to handle metadata of the layers.

Metatools-19.png
Metatools-20.png

[править] Plugin settings

Metatools-21.png

Here you can setup filter for editor "Filtered view" mode, preview files format, default metadata profile and view stylesheets.

Metatools-08.png

[править] Conclusion

At this stage the described plugin is not yet an ideal tool to work with metadata. There is no complex validation and extended node editing. It is impossible to work with the node properties and there is no full-text search.

But even now the plugin is quite functional and convenient. The developers are worked on adding new functionality and new standards. Let's hope that the new versions of plugin will released without this drawbacks.

[править] Contacts

If you want report a bug, make suggestion or have a question about the plugin, please contact us.

Nextgis.png Open source geospatial solutions

Обсудить в форуме Комментариев — 35Редактировать в вики

Последнее обновление: 2016-03-18 13:15

Дата создания: 08.08.2011
Автор(ы): Никулин Евгений


(Геокруг)

Если Вы обнаружили на сайте ошибку, выберите фрагмент текста и нажмите Ctrl+Enter