QGIS Plugins mit Python
QGIS Plugin metadata
Importance of metadata
The metadata.txt file is essential for defining the properties of a QGIS plugin. It provides key information such as the plugin name, author details, description, and category. Properly structured metadata ensures that plugins are correctly categorized, easily discoverable, and well-documented.
Structure of metadata.txt
A metadata.txt file consists of mandatory and optional attributes. Below is a breakdown of the most important attributes.
General Information
[general] name=Plugin Name author=Author Name email=author@example.com qgisMinimumVersion=3.0
- name: The official name of the plugin.
- author: Name(s) of the developer(s).
- email: Contact email for support or inquiries.
- qgisMinimumVersion: Minimum version of QGIS required to run the plugin.
Plugin Description and About
description=Short and clear description of the plugin functionality. about=Detailed explanation of the plugin, including its purpose, features, and how it works.
Categorization and Tags
category=Vector tags=vector, geocoding, point, address
Versioning and Status
version=1.0 experimental=False Changelog: 1.0 - Initial release.
Online Resources
tracker=https://github.com/user/repo/issues repository=https://github.com/user/repo.git homepage=https://github.com/user/repo
Processing Provider
hasProcessingProvider: yes if the plugin provides QGIS processing tools.
Additional Settings
icon: Path to the plugin icon. server: Set to True if the plugin runs on a server.
Best Practices for Writing Metadata Ensure category is valid – Choose one from the predefined list. Include a homepage or repository link – Essential for documentation and support. Keep metadata.txt updated – Especially when releasing new versions.
Example of a Well-Formatted metadata.txt File
[general] name=Advanced Spatial Analysis author=John Doe email=johndoe@example.com qgisMinimumVersion=3.0 description=Perform advanced spatial analysis on vector layers. about=This plugin allows users to conduct advanced spatial analysis operations such as buffering, clipping, and overlay analysis. It integrates seamlessly with the QGIS processing framework. category=Vector tags=vector, spatial analysis, geoprocessing version=1.2 experimental=False Changelog: 1.2 - Added new analysis tools. tracker=https://github.com/johndoe/spatial-analysis-plugin/issues repository=https://github.com/johndoe/spatial-analysis-plugin homepage=https://github.com/johndoe/spatial-analysis-plugin hasProcessingProvider=yes icon=icon.png server=False
Weblinks
- Homepage: http://www.qgis.org/ (Project-Team QGIS)
- Wiki: http://wiki.qgis.org/
- Blog: http://blog.qgis.org
- Bug tracker: https://trac.osgeo.org/qgis/