Current PDAL LAS output is uncompressed.
We should add compression to output.
These can be changed here: https://github.com/OpenDroneMap/OpenDroneMap/blob/master/opendm/types.py#L244
As long as PDAL is compiled with laszip support, that should be all that needs done. If that doesn't work, we'll need to change how we are building PDAL, but as PDAL has made lots of progress on the packaging side of things, this might be worth an upgrade anyway.
Yeah it should be fairly easy and would save space.
I've changed the pdal pipeline to write the compressed *.laz file, but as @smathermather suspected, pdal is not being compiled with LASzip support.
The error I get is:
PDAL: writers.las: Can't write LAZ output. PDAL not built with LASzip or LAZperf.
Looking at the code https://github.com/OpenDroneMap/OpenDroneMap/blob/f09b42ec81bdfcbf2cbc5d5050e3bda0f95e43e0/SuperBuild/cmake/External-PDAL.cmake#L36 the LASZIP is included in the PDAL building process, but that is probably failing.
We need to compile LASzip before installing PDAL, right? Am I able to do that? Hum, I'll try. Help is appreciated :-)
Yeah LASzip should be added as a depedency, just like hexer.
https://github.com/LASzip/LASzip
See the External-Hexer.cmake file, create one for LASzip, then update External-PDAL.cmake to include LASzip as a dependency (on line 5), finally add a line to include LASzip via SETUP_EXTERNAL_PROJECT, then rerun the SuperBuild make.
@pierotofy Thanks for the feedback.
I've tried that, but LASzip is not a cmake project. Right now I can download it, configure, but make fails. I'm quite sure I have path related variables not properly set.
set(_proj_name laszip)
set(_SB_BINARY_DIR "${SB_BINARY_DIR}/${_proj_name}")
ExternalProject_Add(${_proj_name}
DEPENDS
PREFIX ${_SB_BINARY_DIR}
TMP_DIR ${_SB_BINARY_DIR}/tmp
STAMP_DIR ${_SB_BINARY_DIR}/stamp
#--Download step--------------
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
URL https://github.com/LASzip/LASzip/releases/download/v2.2.0/laszip-src-2.2.0.tar.gz
CONFIGURE_COMMAND <SOURCE_DIR>/configure
BUILD_COMMAND make
#--Install step---------------
INSTALL_COMMAND make install
#--Output logging-------------
LOG_DOWNLOAD ON
LOG_CONFIGURE ON
LOG_BUILD ON
)
I was able to do add LASzip and also update PDAL. Now compression is working.
I'm preparing a PR with the changes.
馃憤
Hi all, I am still getting the error PDAL: writers.las: Can't write LAZ output. PDAL not built with LASzip or LAZperf. on release 0.9.1. Am I missing anything?
Hi @hy9be -- how are you deploying?
Hi @smathermather, I am doing a local build. The docker deployment does not have the issue (for sure lol)
How are you building PDAL? (Also, we should probably move this over to https://community.opendronemap.org
Most helpful comment
I was able to do add LASzip and also update PDAL. Now compression is working.
I'm preparing a PR with the changes.