X_STYLES - QGIS Plugin

Version 1.0.0

Overview

X_STYLES is a QGIS plugin for automatic assignment of standardized styles to XPlanGML files. The plugin enables immediate, standards-compliant display of spatial planning data directly after import into QGIS.

Main Features

Installation

Installation via QGIS Plugin Manager

  1. Open QGIS
  2. Go to Plugins → Manage and Install Plugins...
  3. Search for "X_STYLES"
  4. Click "Install"

Manual Installation

  1. Download the plugin archive
  2. Extract the archive to your QGIS plugin directory:
  3. Restart QGIS
  4. Enable the plugin under Plugins → Manage and Install Plugins...

Usage

Basic Usage

  1. Load one or more XPlanGML files into QGIS (via Layer → Add Layer → Add Vector Layer...)
  2. Click the X_STYLES icon in the toolbar
  3. The plugin automatically applies the appropriate styles to all recognized XPlan layers
  4. A success message shows which layers were styled
Tip: The plugin automatically detects the layer type (BP, FP, RP) based on the layer name and applies the appropriate styles.

Configure Settings

Via the dropdown menu of the X_STYLES icon, you can open the settings:

  1. Click the arrow next to the X_STYLES icon
  2. Select Settings
  3. Configure the following options:

Available Settings

Option Description
FP Style Enables special styles for land use plans from the FP directory
RP Style Enables special styles for regional spatial planning programs from the RP directory
Custom Layer Order Applies a custom display order based on z-index
Sort Layer Tree Sorts the layers in the layer tree according to display order
Rename Layers Adds geometry suffix to layer names (_p for point, _l for line, _a for area)
Base Style Directory Directory with base QML files and manifest.yaml
FP Style Directory Optional directory with specific FP styles (overrides base styles)
RP Style Directory Optional directory with specific RP styles (overrides base styles)

Advanced Configuration

The manifest.yaml File

The heart of style management is the manifest.yaml file in the base style directory. This file defines the mapping between layer names and QML files.

Structure of manifest.yaml

bp_anpflanzungbindungerhaltung:
    PointGeometry:
        path: BP_AnpflanzungBindungErhaltung_p.qml
        zIndex: 115
    LineGeometry:
        path: BP_AnpflanzungBindungErhaltung_l.qml
        zIndex: 120
    PolygonGeometry:
        path: BP_AnpflanzungBindungErhaltung_f.qml
        zIndex: 131
    

Parameter Explanation

z-Index Conventions

Recommended z-Index Ranges:

Troubleshooting

Plugin Does Not Apply Styles

Wrong Styles Are Applied

YAML is indentation-sensitive! Use spaces (not tabs) and ensure consistent indentation (4 spaces per level recommended).

License

This plugin is released under the GNU General Public License Version 2. You are free to use, modify, and distribute it.

Support and Contact


© 2024 PlanDigitalOSS | X_STYLES v1.0.0