cars-rasterize aims to convert a point cloud into a digital surface (or terrain) model with colors.
It is a part of the photogrammetry tool cars extracting Digital Surface Models from satellite images.
cars-rasterize is available on Pypi and can be installed by:
pip install cars-rasterize
- Download subsampled_nimes.laz*:
wget https://raw.githubusercontent.com/CNES/cars-rasterize/master/data/subsampled_nimes.laz
subsampled_nimes.laz |
---|
subsampled_nimes.laz* is from https://geoservices.ign.fr/lidarhd. and has been downsampled (1 point every 50cm) to make the file smaller.
- Run las2tif executable:
las2tif subsampled_nimes.laz dsm.tif --clr_out clr.tif
- ✅ Done! The executable generates two files:
- dsm.tif: the elevation of the points (Z dimension) are projected into a regular grid to generate a raster file named Digital Surface Model.
- clr.tif: the red, the green and the blue dimensions can be also projected producing a color interpretation map superimposable on DSM
dsm.tif | clr.tif |
---|---|
A LAS file contains a set of points
-
$x$ and$y$ correspond to planimetric information -
$z$ corresponds to the altitude -
$r$ ,$g$ and$b$ correspond to colorimetric information (respectively red, green, blue )
To create a raster digital surface model, we define a regular grid on a region of interest roi of origin
For each cell of center
Contributing points |
---|
Then, the altitude assigned
Finally, to have a superimposable color to this dsm, the colors are averaged in the same way.
cars-rasterize is a free software: Apache Software License 2.0. See Contribution manual.