Points2Grid : A Local Gridding Method for DEM Generation from Lidar Point Cloud Data


Points2Grid is used as the default DEM generation algorithm for the OpenTopography point cloud processing system

here is how-to install and use.


sudo apt-get update

sudo apt-get install build-essential gdal-bin libcurl4-gnutls-dev libbz2-dev libboost-all-dev  

  • get the source code : https://github.com/CRREL/points2grid/ . Use either git clone, either download ZIP archive
  • go into the  points2grid directory
  • follow the steps indicated in INSTALL.md, which basically were for me:

sudo mkdir build

cd build

sudo cmake ..        #check no error message in this step and followings
sudo make
sudo make install

  • add to file ~/.bashrc

export PATH=$PATH:/usr/local/bin

  • If no error message, you’re done. Test it by running inside the build directory the command:

./points2grid --help

This shoud write down the full help message


  • Use las point cloud as input, if you have LAZ convert it with for example with Lastools:
    LAStools\bin\las2las -i .\20200311_MA_GCP12.laz -o .\20200311_MA_GCP12.las
  • Gridding example command :

./points2grid -i  /path_to_input/20200311_MA_GCP12.las  -o /path_to_output -r 0.0707 --input_format las --all --resolution 0.1 --fill

    • options :
      -r : search radius, which usually is calculated as : resolution*sqrt(2)/2
      –fill : fill empty cells using a 3×3 window
      –all : all the possible calculation are made (see below)

as output, one can get, Oh Miracle!, the following calculation in asc or grid format :

–min                             the Zmin values are stored
–max                             the Zmax values are stored
–mean                            the Zmean values are stored
–idw                             the Zidw values are stored
–std                             the Zstd values are stored
–den                             the density values are stored
–all                             all the values are stored (default)