Skip to content
linzPublic

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

2 watching

Forks

Latest commit

 

History

57 Commits

Folders and files

Repository files navigation

Toitū Te Whenua LINZ LiDAR QC Application

linz-lidar-qc is a command line application that consists of tools to aid in quality checking LiDAR data, created by Toitū Te Whenua Land Information New Zealand. Currently only works on Windows operating systems.

Installation

Store code locally and install Anaconda.

In the Anaconda Terminal, navigate into the directory where the code is stored (using cd), and use the environment yml file to create a conda virtual environment:

conda env create -f environment.yml

Activate the environment:

conda activate lidar-qc

Install the application:

pip install --editable .

License

This repository is licensed under the MIT license. For more information see the license file.

Usage

The application is called using linz-lidar-qc. Use --help for more information on the application.

There are currently 5 commands on the application. More commands will be added as development continues.

build-vrt

Creates a virtual raster for a directory of tif files.

Basic usage: --input can be used more than once in command line.

linz-lidar-qc build-vrt --input H:\lidar-dataset\Raw\DEM

check-dataset

Gathers metadata information on all products of LiDAR data (raster and point clouds) and outputs information to a geopackage. This tool also checks the tiling of a dataset. Use the --build-vrt argument to build vrts for the raster folders.

Basic usage: --input assumes a file structure where all 3 product folders are within a parent directory. The script will look in the parent directory and run the script on any folder names that cotain laz/las/point/dem/dsm (capitalisation is fine). --output is the location and name for the geopackage that gets created.

linz-lidar-qc check-dataset --input H:\lidar-dataset\Raw --output H:\lidar-dataset\Processed\metadata_output.gpkg

To check product file numbers against tile-index feature number:

linz-lidar-qc check-dataset --input H:\lidar-dataset\Raw --output H:\lidar-dataset\Processed\metadata_output.gpkg --tile-index H:\lidar-dataset\Raw\tile_index.shp

To run the command on 1 child folder, use --ras-folder and/or --pc-folder:

linz-lidar-qc check-dataset --input-dir H:\lidar-dataset\Raw --output-gpkg H:\lidar-dataset\Processed\metadata_output.gpkg --ras-folder DEM --pc-folder LAZ

density-raster

Creates a density raster vrt from the point clouds, based on a point cloud filter. Use --help to see all the filter options.

Basic usage: --input is the location of the point cloud folder and --filter is how the point clouds will be filtered to create the density raster.

linz-lidar-qc density-raster --input H:\lidar-dataset\Raw\LAZ --filter ground

To run a series of pre-set density rasters, use the filter 'common'. This will create a density raster for pulse, ground, low vegetation, buildings, unclassified, and noise.

linz-lidar-qc density-raster --input H:\lidar-dataset\Raw\LAZ --filter common

To create a density raster for every available filter in one run, use the filter 'all'. Each tile is still read only once.

linz-lidar-qc density-raster --input H:\lidar-dataset\Raw\LAZ --filter all

psid

Creates a text file that contains a pointcloud file name and a list of the point source ID's in that file.

Basic usage: --input is the location of the point cloud folder and --output is the location where the output text file will be created.

linz-lidar-qc psid --input H:\lidar-dataset\Raw\Point_cloud --output H:\lidar-dataset\Processed

To compare point source ID's for a dataset against the flightline ID's use both --flightline and --fid-field

linz-lidar-qc psid --input H:\lidar-dataset\Raw\Point_cloud --output H:\lidar-dataset\Processed --flightline H:\lidar-dataset\Raw\flightline.shp --fid-field FLIGHT_LIN

rename

Rename DEM, DSM or Point Cloud files in accordance with section 9.2 in the New Zealand National Aerial LiDAR Base Specification.
This function runs as a dry run initially until --write is passed. It renames the existing files and does not make a copy.

It will automatically determine the correct tile scale (1000 or 500) for each file based on its geometry.

If an output location is provided, the renamed files will be placed in a subdirectory matching the original folder name.

Basic usage:
--input is the path to a directory containing raster or point cloud files. It can be speicifed multiple times if more than one directory for a survey needs to be renamed. --year is the start year of the survey. --write confirms the overwrite. --limit limits the number of files the dry-run is run against.

Run a dry-run on 100 files:

linz-lidar-qc rename --input H:\lidar-dataset\Processed --year 2020 --limit 100

To rename files in a single directory:

linz-lidar-qc rename --input H:\lidar-dataset\Processed --year 2020 --write

To rename files in multiple directories:

linz-lidar-qc rename --input H:\lidar-dataset\dem --input H:\lidar-dataset\point-clouds --input H:\lidar-dataset\dsm --year 2025 --write

To rename files to a new location while preserving the original subdirectory:

linz-lidar-qc rename --input H:\lidar-dataset\Processed --output H:\lidar-dataset\Renamed --year 2020 --write

This will place renamed files from e.g. Processed\DEM\file.tif into Renamed\DEM\newname.tif.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages