Skip to content

Package Style Loader

The Package Style Loader provides a dedicated, purpose-built interface for batch-detecting, assigning, and applying official PSA, LGU, MBI Cases, and Building Point symbology styles to packaged municipal boundary layers while enforcing standard cartographic layer tree hierarchy.

Access

  • Menu: Gemma → Updating of Boundaries → Package Style Loader
  • Component Algorithm ID: gmd_pipeline:applyqmlstyles

The tool operates as an interactive modal dialog within QGIS Desktop. It scans active project layers or specific municipal packages, maps vector layers to official .qml styling profiles, and reorders layers inside their parent groups.

When to Use

Use this tool when:

  • Working with municipal packages generated by boundary packaging tools or manually imported from GeoPackages.
  • Applying official PSA and LGU QML symbology profiles (ref_province_psa.qml, ref_province_lgu.qml, ref_mbi_cases.qml, 1. Base Layer Building Points.qml) in a single consolidated pass.
  • Standardizing the Layer Tree order so that point features render above polygons and administrative boundary cases are prominently displayed.
  • Customizing or reassigning external .qml style templates to specific project layers.

Key Features

1. Target Layer Scope

  • Scope Selection: Select specific layer packages from a dropdown list (e.g. individual municipal groups like 00501_Bacacay, or All Project Layers).
  • Interactive Hover Styling: Enhanced dropdown styling ensures item text remains clearly visible with high-contrast highlighting when navigating with the mouse.
  • Refresh & Auto-Match: One-click re-scanning of the active QGIS project to detect newly added layers and match standard suffixes against official styling profiles.

2. Layer & Style Mapping Table

  • Clean Layer Identification: Displays each vector layer in the selected scope using its clean, actual layer name without redundant geometry prefix badges.
  • Role Detection Engine: Automatically categorizes layer roles based on standardized name patterns:
    • Building Points (*_bldg_point)1. Base Layer Building Points.qml
    • MBI Cases (*_mbi_cases)ref_mbi_cases.qml
    • PSA Boundary (*_psa)ref_province_psa.qml
    • LGU Boundary (*_lgu)ref_province_lgu.qml
    • Barangay Boundary (*_bgy)5. Base Layer Barangay.qml
    • Enumeration Area (*_ea)4. Base Layer EA.qml
    • Roads (*_road)7. Base Layer Road.qml
    • Rivers (*_river)9. Base Layer River.qml
  • QML Style Dropdown: Select from built-in templates in the plugin's qml styles/ library with the auto-detected style preselected.
  • Custom QML Browser: Browse and assign external .qml files directly from disk for any specific row.
  • Quick Selection Actions: Bulk controls including Select All, Deselect All, and Select Matched (selects only rows where a valid style profile was matched).
  • Instant Search Filter: Real-time search bar to filter table rows by layer name or detected role.

3. Layer Tree Organization & Cartographic Hierarchy

  • Official Layer Tree Order: When the organization checkbox is enabled, layers within each parent group are automatically arranged from top to bottom following the official boundary updating hierarchy:Building PointsMBI CasesPSA BoundaryLGU BoundaryContextual Layers
  • Priority Ranking:
    1. Priority 0 (Top): Building Points (*_bldg_point, bldg_points, building points)
    2. Priority 1 (Second): MBI Cases (ref_mbi_cases, mbi_cases, ref_mbi)
    3. Priority 2 (Third): PSA Boundary (*_psa, ref_province_psa, province_psa)
    4. Priority 3 (Fourth): LGU Boundary (*_lgu, ref_province_lgu, province_lgu)
    5. Priority 4+ (Base): Contextual boundary layers (Barangay _bgy, EA _ea), road/river centerlines, and background layers.
  • Visibility Enforcement: Automatically sets styled layers to visible and refreshes the QGIS map canvas upon completion.

How It Works

  1. Select Layer Scope:

    • Select the target group or scope from the dropdown (e.g. 00501_Bacacay or All Project Layers).
    • The tool populates the mapping table, sorting rows by layer priority order.
  2. Verify Style Assignments:

    • Confirm auto-detected roles and selected QML templates.
    • Adjust selections via dropdowns or load custom .qml files if necessary.
  3. Apply Package Styles:

    • Click Apply Package Styles.
    • The tool applies symbology and labeling configurations using apply_qml_to_layer.
    • If Order layer tree is checked, layers within each municipal group are reordered to maintain proper cartographic visibility.
    • The map canvas refreshes immediately.

Supported Geometry Types

  • Point and MultiPoint (Building points, landmarks)
  • LineString and MultiLineString (Roads, rivers)
  • Polygon and MultiPolygon (PSA boundaries, LGU boundaries, MBI cases, barangays, EAs)

Custom QML Files

To apply specialized or agency-customized QML styling templates, click the browse button (...) in any table row to select an external .qml file. The selected style is loaded and assigned immediately.

Preserving Map Rendering Performance

When working with large provincial datasets containing multiple municipalities, select a specific municipal group in the Target Layer Scope rather than All Project Layers. This limits processing and canvas refresh operations to the active municipality.

Developed by the Geospatial Management Division