OpenDroneMap-ODM/contrib/pc2dem
Piero Toffanin 18d4d31be7 Fix pc2dem.py 2023-12-06 12:34:07 -05:00
..
README.md Update README.md 2021-03-24 13:49:59 -04:00
pc2dem.py Fix pc2dem.py 2023-12-06 12:34:07 -05:00

README.md

Point Cloud To DEM

Convert point clouds (LAS, LAZ, PLY, and any other format compatible with PDAL) to GeoTIFF elevation models.

image

This tool includes methods to perform efficient and scalable gapfill interpolation and is the same method used by ODM's processing pipeline. It is offered here as a standalone module for processing individual point clouds.

Usage

docker run -ti --rm -v /home/youruser/folder_with_point_cloud:/input --entrypoint /code/contrib/pc2dem/pc2dem.py opendronemap/odm /input/point_cloud.las [flags]

The result (dsm.tif or dtm.tif) will be stored in the same folder as the input point cloud. See additional flags you can pass at the end of the command above:

usage: pc2dem.py [-h] [--type {dsm,dtm}] [--resolution RESOLUTION]
                 [--gapfill-steps GAPFILL_STEPS]
                 point_cloud

Generate DEMs from point clouds using ODM's algorithm.

positional arguments:
  point_cloud           Path to point cloud file (.las, .laz,
                        .ply)

optional arguments:
  -h, --help            show this help message and exit
  --type {dsm,dtm}      Type of DEM. Default: dsm
  --resolution RESOLUTION
                        Resolution in m/px. Default: 0.05
  --gapfill-steps GAPFILL_STEPS
                        Number of steps used to fill areas with
                        gaps. Set to 0 to disable gap filling.
                        Starting with a radius equal to the output
                        resolution, N different DEMs are generated
                        with progressively bigger radius using the
                        inverse distance weighted (IDW) algorithm
                        and merged together. Remaining gaps are
                        then merged using nearest neighbor
                        interpolation. Default: 3