QGIS Nova Scotia & PEI LiDAR Processing Tool
A command-line tool for processing LiDAR data from Nova Scotia and Prince Edward Island using QGIS. This tool allows you to:
- Geocode addresses in Nova Scotia and PEI
- Download and process LiDAR point cloud data
- Extract building footprints from LiDAR data
- Generate satellite imagery for the location
- Visualize 3D point clouds
Features
- Address geocoding using OpenStreetMap Nominatim API
- Coordinate transformation between different CRS (WGS84, NAD83(CSRS), MTM zone 5)
- LiDAR point cloud processing using laspy
- Building point extraction
- 3D visualization capabilities
- Satellite imagery retrieval from Mapbox
Prerequisites
- Python 3.8 or higher
- QGIS 3.22.0 or higher
- Conda (required for QGIS installation)
Installation
The installation process has three steps: setting up QGIS, installing dependencies, and installing this package.
1. Install QGIS using Conda
First, create a new conda environment with QGIS installed:
# Create a new environment with QGIS and Python 3.8
conda create -n qgis-env -c conda-forge qgis python=3.8
# Activate the environment
conda activate qgis-env
2. Install Dependencies
Install required dependencies using conda:
conda install -c conda-forge pyproj numpy matplotlib
conda install -c conda-forge laspy lazrs
3. Install qgis-ns-pe
After activating the conda environment and installing dependencies, install this package:
# For users: install from PyPI (not yet available)
# pip install qgis-ns-pe
# For developers: install in editable mode from source
git clone https://github.com/amadgakkhar/qgis-ns-pe.git
cd qgis-ns-pe
pip install -e .
Package Structure
The package should have the following structure:
qgis-ns-pe/
├── qgis_ns_pe/
│ ├── __init__.py
│ └── cli.py
├── setup.py
└── README.md
Verification
To verify the installation:
# Make sure you're in the conda environment
conda activate qgis-env
# Try running the tool with --help
qgis-ns-pe --help
Usage
The tool can be used from the command line with the following syntax:
qgis-ns-pe --address "Your Address" --index_path "/path/to/lidar_index.gpkg" [--show_3d]
Example:
qgis-ns-pe --address "8 Alderwood Dr, Halifax, NS B3N 1S7" --index_path "/path/to/Index_LiDARtiles_tuileslidar.gpkg" --show_3d
Arguments
--address: The address to process (required)--index_path: Path to the LiDAR index GPKG file (required)--show_3d: Optional flag to show 3D visualizations of the point clouds
Output
The tool creates two directories:
lidar_tiles/: Contains downloaded LiDAR tilesoutput/: Contains processed files:sat.png: Satellite image of the locationlidar_cropped.laz: Cropped LiDAR point cloudbuildings.laz: Extracted building points
Troubleshooting
Common issues and solutions:
- QGIS not found: Make sure you've activated the conda environment with
conda activate qgis-env - Import errors: Ensure you're running the tool from the conda environment where QGIS is installed
- Missing dependencies: If you encounter any missing dependency errors, try installing them with conda first:
conda install -c conda-forge <package-name>
Data Sources
- LiDAR data: Nova Scotia and PEI government open data portals
- Geocoding: OpenStreetMap Nominatim API
- Satellite imagery: Mapbox Static Images API
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Authors
- Amad Gakkhar - Initial work
Acknowledgments
- QGIS Development Team
- laspy contributors
- OpenStreetMap contributors
- Mapbox
Metadata
Release files for qgis-ns-pe 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| qgis_ns_pe-0.1.3.tar.gz | 17.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qgis_ns_pe-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.4 kB
Release files / qgis_ns_pe-0.1.3.tar.gz
| Download URL | qgis_ns_pe-0.1.3.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
952149c4c83a2f619291e2aeca8657d56cb31076685d9ff8cf08bcb05a95674b
|
|
BLAKE2b-256 checksum How to use checksums |
17130b7d905dd6a9307b1b912d2c6a61090db4b1b1105ebc8300ab43c211a89f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.16
|
Release files / qgis_ns_pe-0.1.3-py3-none-any.whl
| Download URL | qgis_ns_pe-0.1.3-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0c8abb8c9a450d1554fd10904765064ffec84a76ef2b0ad1c8cb51c6b3a2f848
|
|
BLAKE2b-256 checksum How to use checksums |
6f929d95a84d989f1dcf708cf6a48447c620d50f7044dbd618f1f4dc8cb539ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.16
|
Security for qgis-ns-pe 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.