CS 519: Scientific Visualization: Visualizing LiDAR Data
Resources
ParaView:
ParaView is an open-source, multi-platform data analysis and visualization application. [link]
Python:
Python is a programming language that is particularly suited to reformating data
- Enthought Canopy: A complete Python IDE with a package management system...so it's easy to install libraries like VTK [link]
- Python Interpreter with IDLE: Offical and most up-to-date Python disttibution with IDLE editor [link]
laspy: A Python library for reading Light Detection and Ranging (LAS) files [link]
Language Reference:
Python [link]
VTK file format [link]
Mini-Hackathon: LiDAR Data Conversion
Preliminary Work
- Install ParaView
- Install Python or Canopy
- Install laspy [link]
- Get the disribution from Github [link]
- Follow the instuctrions in the tutorial [link]
- Grab the starter code [las-starter-code.py]
File Format Conversion
The first challenge is to simply convert 3D point data in the las file to a VTK file and view the result in ParaView
- Note: It is possible to install the VTK library and use from a Python script [link to VTK Python FAQ]
This would be the preferred way to write out a VTK file...you simply call the approrpriate library function.
This is especially easy from Canopy as its package manager lets you install VTK without too much pain.
- It is also possible to write out a text file in the VTK 4.2 file format which is what we will focus on.
We will write out the 3D points as an unstructured grid in which each cell is simply a point.
Fill in the approriate code in las-starter-code.py and convert the laspy test data set to VTK...see what it looks like in ParaView.

Simple Surface Generation
As a next step, see if you can generate a approximate surface for the point data and write that out as an unstructured VTK grid.
LAS file values are a height field in the Z coordinate. You can:
- Implement a 2D grid in Python that covers the XY domain of the data
- In each grid cell, compute the average point in the cell and the minimum height point
- Create a mesh of triangles that corresponds to the dual of your grid.
- Each triangle vertex is the point in a cell. You can use either the average or min....see which looks better.
- Each triangle edge crosses a grid edge
- Write out the traingle mesh as an unstructured grid VTK file
If you want a simpler alternative you could write out a quad mesh in which
- Each cell is a grid cell
- The grid vertex positions in Z are interpolated from the average points in each cell bordering the grid vertex.
Here's code the implements the simple solution:
las-test-soln.py
uGrid.py
Here's a larger data set for you to try if you wish:
las2010.las