Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
giswqs
GitHub Repository: giswqs/geemap
Path: blob/master/docs/notebooks/101_lidar.ipynb
2313 views
Kernel: Python 3

image image

Visualizing LiDAR data in 3D with only one line of code

Uncomment the following line to install geemap if needed.

# !pip install geemap[lidar] open3d
import os import geemap

Download a sample LiDAR dataset from Google Drive. The zip file is 52.1 MB and the uncompressed LAS file is 109 MB.

url = ( "https://drive.google.com/file/d/1H_X1190vL63BoFYa_cVBDxtIa8rG-Usb/view?usp=sharing" ) filename = "madison.las"
if not os.path.exists(filename): geemap.download_file(url, "madison.zip", unzip=True)

Read the LiDAR data

las = geemap.read_lidar(filename)

The LAS header.

las.header

The number of points.

las.header.point_count

The list of features.

list(las.point_format.dimension_names)

Inspect data.

las.X
las.Y
las.Z
las.intensity

Visualize LiDAR data using the pyvista backend.

# geemap.view_lidar(filename, cmap='terrain', backend='pyvista')

Visualize LiDAR data using the ipygany backend.

# geemap.view_lidar(filename, backend='ipygany', background='white')

Visualize LiDAR data using the panel backend.

# geemap.view_lidar(filename, cmap='terrain', backend='panel', background='white')

Visualize LiDAR data using the open3d backend.

# geemap.view_lidar(filename, backend='open3d')