How to Install PDAL

3 min read

PDAL

PDAL represents Point Data Abstraction Library. It is a C/C++ open source library and applications for translating and processing point cloud data. It is not limited to LiDAR data.

PDAL allows you to compose operations on point clouds into pipelines of stages. The documentation is very thorough on pdal.io, which also hosts a complete and intuitive workshop, Point Cloud Processing and Analysis with PDAL, that makes it easy to start with PDAL and Entwine.

First we have to setup PDAL. To install it, I have used Conda.

Install Anaconda from https://docs.anaconda.com/anaconda/install/ and choose the packages for your operating system (if you don’t already have it). Here is a tutorial for installing Anaconda on Windows. Here‘s a guide to conda environments.

Below are the instructions for Linux.

# install the following extended dependencies for Qt
sudo apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6
# go to Downloads folder
cd ~/Downloads
# download the Anaconda installer for Linux
wget https://www.anaconda.com/download/#linux
# list the files to see the file name
ls -lah
# verify data integrity with SHA-256
sha256sum Anaconda3-2019.10-Linux-x86_64.sh
# install Anaconda for Python 3.7
bash Anaconda3-2019.10-Linux-x86_64.sh
# type 'yes' to 'Do you accept the license terms? [yes|no]'
# type 'yes' to 'Do you wish the installer to initialize Anaconda3 by running conda init?'

# update conda
conda update -n base -c defaults conda
# check conda version
conda --version

If everything went ok, you should see:

[...]
==> For changes to take effect, close and re-open your current shell. <==

If you'd prefer that conda's base environment not be activated on startup, 
   set the auto_activate_base parameter to false: 

conda config --set auto_activate_base false

Thank you for installing Anaconda3!

===========================================================================

Anaconda and JetBrains are working together to bring you Anaconda-powered
environments tightly integrated in the PyCharm IDE.

PyCharm for Anaconda is available at:
https://www.anaconda.com/pycharm

Type source ~/.bashrc for the installation to take effect. Set conda config --set auto_activate_base.

To verify the installation, type conda list , anaconda-navigator, or start the Python shell with python .

Python 3.7.4 (default, Aug 13 2019, 20:35:49) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

A comprehensive list of conda commands can be found at Command reference.

We go to the command line, and use a succession of commands to create a new environment named new_clouds. You can use conda create, conda activate, conda deactivateand conda removefor the full cicle of an environment.

# Go to the working folder
cd phili

# Create new environment named new_clouds
conda create --name new_clouds
# Activate the environment
conda activate new_clouds
(base) myuser@comp:~/phili$ conda create --name new_clouds
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/myuser/anaconda3/envs/new_clouds

Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate new_clouds
#
# To deactivate an active environment, use
#
#     $ conda deactivate
(base) myuser@comp:~/phili$ conda activate new_clouds
(new_clouds) myuser@comp:~/phil$

We install PDAL in this new environment.

# Install pdal, python-pdal and gdal from the Conda Forge channel, in existing environment:
conda install --name new_clouds --channel conda-forge pdal python-pdal gdal
# Check pdal version
pdal --version

You can also create and install PDAL in a new environment using:

conda create --yes --name new_clouds --channel conda-forge pdal python-pdal gdal

Entwine

We can install the Entwine package from the Conda Forge catalog.

conda install --name new_clouds --channel conda-forge entwine
(new_clouds) myuser@comp:~/phili$ conda install --name new_clouds --channel conda-forge entwine
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/myuser/anaconda3/envs/new_clouds

  added / updated specs:
    - entwine


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    entwine-2.1.0              |       hb51ef68_2         1.1 MB  conda-forge
    ------------------------------------------------------------
                                           Total:         1.1 MB

The following NEW packages will be INSTALLED:

  entwine            conda-forge/linux-64::entwine-2.1.0-hb51ef68_2


Proceed ([y]/n)? y


Downloading and Extracting Packages
entwine-2.1.0        | 1.1 MB    | ################################################################################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(new_clouds) myuser@comp:~/phili$

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll Up