Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,16 @@ RUN apt-get update && apt-get upgrade -y && \
libgtest-dev && \
rm -rf /var/lib/apt/lists/*

# Clone, build and clean up LASzip
# Clone, build and clean up LASzip (3.x supports LAS 1.4 via laszip_api.h C API)
RUN git clone https://github.com/LASzip/LASzip.git && \
cd LASzip && \
git checkout tags/2.0.1 && \
git checkout tags/3.4.4 && \
mkdir build && cd build && \
cmake .. && \
cmake .. -DCMAKE_BUILD_TYPE=Release && \
make -j$(nproc) && \
make install && \
cp bin/Release/liblas* /usr/lib/ && \
cd ../.. && rm -rf LASzip

# Clone, build and clean up libLAS
RUN git clone https://github.com/libLAS/libLAS.git && \
cd libLAS && \
mkdir build && cd build && \
cmake .. -DWITH_LASZIP=ON -DWITH_GEOTIFF=OFF && \
make -j$(nproc) && \
make install && \
cd ../.. && rm -rf libLAS

# Clone, build and clean up Qhull
RUN git clone https://github.com/qhull/qhull.git && \
cd qhull && \
Expand All @@ -69,6 +59,10 @@ RUN git clone https://github.com/ethz-asl/libnabo.git && \
# Update ldconfig
RUN ldconfig /usr/local/lib

# Copy build script into image
COPY .devcontainer/commands/compile_install.sh /usr/local/bin/compile_install.sh
RUN chmod +x /usr/local/bin/compile_install.sh

# Set the working directory
WORKDIR /workspaces/raycloudtools

Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
},
"remoteUser": "root",
"forwardPorts": [],
"postCreateCommand": "chmod +x /workspaces/raycloudtools/.devcontainer/commands/compile_install.sh && /workspaces/raycloudtools/.devcontainer/commands/compile_install.sh"
"postCreateCommand": "compile_install.sh",
"runArgs": ["--security-opt", "label=disable"]
}
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ option(RAYCLOUD_BUILD_TESTS "Build unit tests?" OFF)
option(RAYCLOUD_LEAK_TRACK "Enable memory leak tracking?" OFF)

# WITH_ build options.
option(WITH_LAS "With liblas for las file support?" OFF)
option(WITH_LAS "With LASzip for las/laz file support (LAS 1.0-1.4)?" OFF)
option(WITH_QHULL "With libqhull support?" OFF)
option(WITH_TIFF "With libgeotiff support?" OFF)
option(WITH_TBB "With Intel Threading Building Blocks support multi-threadding?" OFF)
Expand Down Expand Up @@ -58,9 +58,9 @@ set(RAYTOOLS_LINK ${libnabo_LIBRARIES} OpenMP::OpenMP_CXX Threads::Threads)

# Optionally configured packages.
if(WITH_LAS)
find_package(libLAS REQUIRED)
list(APPEND RAYTOOLS_INCLUDE ${libLAS_INCLUDE_DIRS})
list(APPEND RAYTOOLS_LINK ${libLAS_LIBRARIES})
find_package(LASzip REQUIRED)
list(APPEND RAYTOOLS_INCLUDE ${LASzip_INCLUDE_DIRS})
list(APPEND RAYTOOLS_LINK ${LASzip_LIBRARIES})
endif(WITH_LAS)

if(WITH_QHULL)
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,10 @@ This gives an example of how the command line tools could be sequenced to analys

*Optional build dependencies:*

For rayconvert to work from .laz files:
* git clone https://github.com/LASzip/LASzip.git, then git checkout tags/2.0.1, then mkdir build, cd build, cmake .., make, sudo make install.
* git clone https://github.com/libLAS/libLAS.git, then mkdir build, cd build, cmake .. -DWITH_LASZIP=ON, make, sudo make install (you'll need GEOTIFF to be off in libLAS, and to have installed boost)
For rayimport/rayexport to work with .las and .laz files (LAS 1.0 through 1.4, including COPC):
* git clone https://github.com/LASzip/LASzip.git, git checkout tags/3.4.4, then mkdir build, cd build, cmake .. -DCMAKE_BUILD_TYPE=Release, make, sudo make install.
* in raycloudtools/build: cmake .. -DWITH_LAS=ON (or ccmake .. to turn on/off WITH_LAS)
* note that you may need to add the liblas path into LD_LIBRARY path, normally this can be done with the following line in your ~/.bashrc: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
* note that you may need to add the LASzip install path into LD_LIBRARY_PATH, normally this can be done with the following line in your ~/.bashrc: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

For raywrap:

Expand Down
26 changes: 26 additions & 0 deletions cmake/FindLASzip.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This module searches for the standalone LASzip library (3.x+, with LAS 1.4 support)
# and defines:
# LASzip_LIBRARIES - link libraries
# LASzip_INCLUDE_DIRS - include directories (contains laszip/laszip_api.h)
# LASzip_FOUND - true if found

find_path(LASzip_INCLUDE_DIRS
NAMES laszip/laszip_api.h
HINTS ENV LASzip_ROOT
PATH_SUFFIXES include
)

find_library(LASzip_LIBRARY
NAMES laszip
HINTS ENV LASzip_ROOT
PATH_SUFFIXES lib
)

set(LASzip_LIBRARIES ${LASzip_LIBRARY})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LASzip
REQUIRED_VARS LASzip_LIBRARIES LASzip_INCLUDE_DIRS
)

mark_as_advanced(LASzip_INCLUDE_DIRS LASzip_LIBRARIES LASzip_LIBRARY)
85 changes: 0 additions & 85 deletions cmake/FindlibLAS.cmake

This file was deleted.

16 changes: 3 additions & 13 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,16 @@ WORKDIR /deps
RUN mkdir -p /deps && \
cd /deps

# Clone, build and clean up LASzip
# Clone, build and clean up LASzip (3.x supports LAS 1.4 via laszip_api.h C API)
RUN git clone https://github.com/LASzip/LASzip.git && \
cd LASzip && \
git checkout tags/2.0.1 && \
git checkout tags/3.4.4 && \
mkdir build && cd build && \
cmake .. && \
cmake .. -DCMAKE_BUILD_TYPE=Release && \
make -j$(nproc) && \
make install && \
cp bin/Release/liblas* /usr/lib/ && \
cd ../.. && rm -rf LASzip

# Clone, build and clean up libLAS
RUN git clone https://github.com/libLAS/libLAS.git && \
cd libLAS && \
mkdir build && cd build && \
cmake .. -DWITH_LASZIP=ON -DWITH_GEOTIFF=OFF -DCMAKE_CXX_STANDARD=14 && \
make -j$(nproc) && \
make install && \
cd ../.. && rm -rf libLAS

# Clone, build and clean up Qhull
RUN git clone https://github.com/qhull/qhull.git && \
cd qhull && \
Expand Down
Loading
Loading