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
.qmlstyle 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, orAll 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
- Building Points (
- 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
.qmlfiles 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:
- Priority Ranking:
- Priority 0 (Top): Building Points (
*_bldg_point,bldg_points,building points) - Priority 1 (Second): MBI Cases (
ref_mbi_cases,mbi_cases,ref_mbi) - Priority 2 (Third): PSA Boundary (
*_psa,ref_province_psa,province_psa) - Priority 3 (Fourth): LGU Boundary (
*_lgu,ref_province_lgu,province_lgu) - Priority 4+ (Base): Contextual boundary layers (Barangay
_bgy, EA_ea), road/river centerlines, and background layers.
- Priority 0 (Top): Building Points (
- Visibility Enforcement: Automatically sets styled layers to visible and refreshes the QGIS map canvas upon completion.
How It Works
Select Layer Scope:
- Select the target group or scope from the dropdown (e.g.
00501_BacacayorAll Project Layers). - The tool populates the mapping table, sorting rows by layer priority order.
- Select the target group or scope from the dropdown (e.g.
Verify Style Assignments:
- Confirm auto-detected roles and selected QML templates.
- Adjust selections via dropdowns or load custom
.qmlfiles if necessary.
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.