-
Notifications
You must be signed in to change notification settings - Fork 0
Folder Layout
Wolren edited this page Apr 30, 2026
·
2 revisions
LIRiAP code organization and folder layout.
LIRiAP/
├── LIRiAP_pack/ # Core algorithm implementations
│ ├── *[_algorithm.py] # QGIS Processing wrappers
│ ├── *[_worker.py] # Geometry solvers (QGIS-independent)
│ ├── numba_bootstrap.py # Numba JIT helper
│ └── help_descriptions.py # Shared help text
├── LiRiAP_provider/ # QGIS plugin integration
│ ├── LIRiAP_plugin.py # Plugin entry point
│ └── algorithms/ # Algorithm provider files
├── tests/ # Test suite
├── docs/ # Documentation
└── README.md # Main readme
Each algorithm has a QGIS Processing wrapper that:
- Declares parameters
- Handles feature serialization
- Manages parallel execution
- Writes output
| File | Algorithm |
|---|---|
approximation_standard_algorithm.py |
Approximation Standard |
approximation_fast_algorithm.py |
Approximation Fast |
skeleton_algorithm.py |
Skeleton (medial-axis skeleton) |
bcrs_algorithm.py |
BCRS |
bcrs_fast_algorithm.py |
BCRS Fast |
axis_aligned_lir_algorithm.py |
Axis-Aligned LIR |
Geometry solvers independent of QGIS/Qt runtime:
- Pure computational logic
- Can be called programmatically
- Numba JIT compilation where applicable
| File | Solves |
|---|---|
approximation_standard_worker.py |
Approximation geometric search |
approximation_fast_worker.py |
Approximation with slice execution |
skeleton_worker.py |
Skeleton with SDF expansion |
bcrs_worker.py |
BCRS with boundary expansion |
bcrs_fast_worker.py |
BCRS with trial ranking |
axis_aligned_lir_worker.py |
Exact axis-aligned solvers |
| File | Purpose |
|---|---|
numba_bootstrap.py |
Safe Numba import/install helper |
help_descriptions.py |
Shared right-panel algorithm descriptions |
QGIS plugin integration files that wrap LIRiAP algorithms as QGIS Processing algorithms.
Test files for algorithm validation:
-
test_axis_aligned_lir.py— Axis-Aligned LIR exactness -
test_event_emission.py— Event handling -
test_real_world_comparison.py— Integration tests -
test_numba_bootstrap.py— Numba bootstrap safety -
test_tuning_constants.py— Parameter guardrails -
test_worker_edge_cases.py— Edge case handling
QGIS Processing Framework
│
├── algorithm.py (wrapper)
│ │
│ ├── worker.py (geometry solver)
│ │ │
│ │ ├── numpy, shapely
│ │ └── numba (optional, for acceleration)
│ │
│ ├── help_descriptions.py
│ └── numba_bootstrap.py
│
└── QGIS Runtime (Qt)
Worker modules can be imported and used programmatically without QGIS:
import sys
sys.path.insert(0, 'LIRiAP_pack')
# Approximation
from approximation_standard_worker import worker_process_feature
# Skeleton
from skeleton_worker import _worker_process_feature
# BCRS
from bcrs_worker import worker_process_feature
# Axis-Aligned
from axis_aligned_lir_worker import _worker_process_featureSee Usage Guide for detailed examples.