Based on https://pdal.io/workshop/exercises/analysis/dtm/dtm.html and syntax clue from https://hannes.enjoys.it/blog/2022/01/converting-geotiff-to-las-laz/ for the command line without JSON pipeline
You need to install both
wget 'https://wxs.ign.fr/c90xknypoz1flvgojchbphgt/telechargement/prepackage/LIDARHD_PACK_NP_2021$LIDARHD_1-0_LAZ_NP-0808_6307-2021/file/LIDARHD_1-0_LAZ_NP-0808_6307-2021.7z'
unp LIDARHD_1-0_LAZ_NP-0808_6307-2021.7z # or 7z e LIDARHD_1-0_LAZ_NP-0808_6307-2021.7z
echo '{
"pipeline":[
"./LIDARHD_1-0_LAZ_NP-0808_6307-2021/Semis_2021_0808_6306_LA93_IGN69.laz",
{
"filename":"./LIDARHD_1-0_LAZ_NP-0808_6307-2021/Semis_2021_0808_6306_LA93_IGN69.tif",
"gdaldriver":"GTiff",
"output_type":"all",
"resolution":"0.5",
"type":"writers.gdal"
}
]
}' >| dtm.json
pdal pipeline ./dtm.json
pdal translate ./LIDARHD_1-0_LAZ_NP-0808_6307-2021/Semis_2021_0808_6306_LA93_IGN69.laz out.tif \
--reader las \
--writer gdal \
--writers.gdal.resolution="0.5" \
--writers.gdal.gdaldriver="GTiff" \
--writers.gdal.output_type="all"
Tried with ogr output (not working, segmentation issue at the moment)
echo '[
"./LIDARHD_1-0_LAZ_NP-0808_6307-2021/Semis_2021_0808_6306_LA93_IGN69.laz",
{
"type": "writers.ogr",
"filename": "./LIDARHD_1-0_LAZ_NP-0808_6307-2021/Semis_2021_0808_6306_LA93_IGN69.shp",
"measure_dim": "Z"
}
]' >| ogr_output.json
pdal pipeline ./ogr_output.json
pdal translate ./LIDARHD_1-0_LAZ_NP-0808_6307-2021/Semis_2021_0808_6306_LA93_IGN69.laz out.shp --reader las --writer ogr