-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
LIRiAP can be installed and used in two ways in QGIS.
This method is useful for quick testing and experiments without enabling a full plugin.
-
Locate your QGIS scripts folder:
- Windows:
C:\Users\<username>\AppData\Roaming\QGIS\QGIS3\profiles\default\processing\scripts\ - Linux:
~/.local/share/QGIS/QGIS3/profiles/default/processing/scripts/ - macOS:
~/Library/Application Support/QGIS/QGIS3/profiles/default/processing/scripts/
- Windows:
-
Copy the algorithm pack:
- Copy the
LIRiAP_packfolder into the scripts folder
- Copy the
-
Restart QGIS (if already open)
-
Use the algorithms:
- Open Processing Toolbox (
Processing→Toolbox) - Search for "LIRiAP"
- Algorithms appear under Scripts → LIRiAP
- Open Processing Toolbox (
- This method doesn't require enabling a plugin
- Changes to scripts require QGIS restart to take effect
- Good for testing individual algorithms
This is the recommended method for regular use, as it provides better integration with QGIS.
-
Locate your QGIS plugins folder:
- Windows:
C:\Users\<username>\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\LIRiAP\ - Linux:
~/.local/share/QGIS/QGIS3/profiles/default/python/plugins/LIRiAP/ - macOS:
~/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/LIRiAP/
- Windows:
-
Copy the plugin files: Create the
LIRiAPfolder and copy:- The
LiRiAP_provider/folder - The
LIRiAP_pack/folder
Your folder structure should look like:
LIRiAP/ ├── LiRiAP_provider/ │ ├── __init__.py │ ├── LIRiAP_plugin.py │ └── algorithms/ ├── LIRiAP_pack/ │ ├── *.py (algorithm and worker files) - The
-
Enable the plugin:
- Open QGIS
- Go to
Plugins→Manage and Install Plugins - Find "LIRiAP" in the list
- Check the box to enable it
-
Verify installation:
- Open Processing Toolbox
- Look for "LIRiAP" group in the algorithm list
-
Open Processing Toolbox:
Processing→Toolbox(or pressCtrl+Alt+T/Cmd+Alt+T) -
Find the algorithm:
- Expand the LIRiAP group, or
- Search for specific algorithm name in the search box
-
Configure and run:
- Double-click an algorithm (e.g., "Approximation Standard")
- Select your Input layer (polygon layer)
- Adjust parameters as needed:
-
GRID_COARSE/GRID_FINE: Search resolution (higher = more accurate, slower) -
ANGLE_STEP: Fallback angle sweep step -
MAX_RATIO: Maximum aspect ratio (0 = unlimited) -
ALWAYS_RETURN: Enable best-effort fallback -
USE_BUFFER: Apply containment margin
-
- Click Run
-
View results:
- Output layer is created in memory (or saved to file if specified)
- Output fields include:
area,angle,ratio, and algorithm-specific diagnostics
- NumPy
- SciPy
- Shapely
These are typically included with QGIS or can be installed via:
pip install numpy scipy shapely
Numba provides JIT compilation that significantly speeds up computations.
Auto-install (in algorithm settings):
- Check
AUTO_INSTALL_NUMBAparameter
Manual install:
pip install numba
Numba is optional but recommended for better performance, especially on larger datasets.
Script folder method:
- Verify
LIRiAP_packfolder is in the correct scripts location - Check for Python errors in the log (
View→Panels→Log Messages→Python)
Plugin method:
- Ensure the plugin is enabled in
Plugins→Manage and Install Plugins - Check
Plugins→Plugin Manager→Settings→Show also experimental plugins - Check for errors in
Plugins→Install from ZIPis NOT needed for local installation
Ensure all dependencies are installed:
pip install numpy scipy shapely numba
- Enable
AUTO_INSTALL_NUMBAor install Numba manually - Reduce
GRID_FINEfor faster (less accurate) results - Use Approximation family for fastest results
- Use single worker (
N_WORKERS=1) for BCRS family