Skip to Main Content
Learning Geospatial Analysis with Python - Third Edition
book

Learning Geospatial Analysis with Python - Third Edition

by Joel Lawhead
September 2019
Beginner content levelBeginner
456 pages
10h 53m
English
Packt Publishing
Content preview from Learning Geospatial Analysis with Python - Third Edition

Creating a grid from the LIDAR data

This script is fairly straightforward. We loop through the (x,y) point locations in the LIDAR data and project them to our grid with a cell size of one meter. Due to the precision of the LIDAR data, we'll end up with multiple points in a single cell. We average these points to create a common elevation value. Another issue that we have to deal with is data loss. Whenever you resample the data, you lose information.

In this case, we'll end up with NODATA holes in the middle of the raster. To deal with this issue, we fill these holes with average values from the surrounding cells, which is a form of interpolation. We only need two modules, both available on PyPI, as shown in the following code:

from laspy.file ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Geospatial Analysis with Python

Mastering Geospatial Analysis with Python

Silas Toms, Eric van Rees, Paul Crickard

Publisher Resources

ISBN: 9781789959277Supplemental Content