LiDAR and pointcloud extension

Paul Ramsey has a great tutorial on using the pointcloud extension with PostgreSQL / PostGIS: http://workshops.boundlessgeo.com/tutorial-lidar/

Image of lidar chipped into 400 point envelopes

You can get point cloud and all that goodness running a variety of ways. Probably the easiest is to download OpenGeo Suite from Boundless: http://boundlessgeo.com/solutions/opengeo-suite/download/

If you are an Ubuntu user, try a docker instance to run PostGIS with PDAL, pointcloud, etc in a container:

https://github.com/vpicavet/docker-pggis

Also, I’m working toward a simple installer script for Ubuntu 14.04 and for Vagrant, which is a fork of Vincent’s docker install:

https://github.com/smathermather/labr-pdal

One tip for those using, say QGIS instead of GeoServer for connecting and visualizing your data. Change any views created on the fly to tables, e.g.:

CREATE VIEW medford_patches AS
SELECT
  pa::geometry(Polygon, 4326) AS geom,
  PC_PatchAvg(pa, 'Z') AS elevation
FROM medford;

change to:

CREATE TABLE medford_patches AS
SELECT
pa::geometry(Polygon, 4326) AS geom,
PC_PatchAvg(pa, ‘Z’) AS elevation
FROM medford;

CREATE VIEW medford_patches AS
SELECT
  pa::geometry(Polygon, 4326) AS geom,
  PC_PatchAvg(pa, 'Z') AS elevation,
  id
FROM medford;

QGIS doesn’t like those views with casts for some reason… . without an id.

If the code I’m working on now works, it will do some height calculations using pointcloud, will show up on Github, and may include a little bonus pointcloud tutorial here. Stay tuned.

6 thoughts on “LiDAR and pointcloud extension

  1. Steven,

    What happens if you include an Id in your view? I recall QGIS having issues with views if no integer id is exposed. Perhaps it doesn’t have the same issue with tables.

  2. I actually got as far as building the PDAL loader too (just basic no hdf/laszip), but basic las. Unfortunately last I tried the 32-bit would segfault on largish point clouds but the 64-bit was okay. I should revisit that. Would be nice to provide a complete package with PDAL loader included for PostGIS 2.2. Then we’ll have pretty much the full shebang of PostGIS w. SFCGAL and Point Cloud (extension/loader) for windows users 🙂

    1. (Hijacking this thread) — You indicated in a recent post (that I can’t seem to find) that and operators would effectively be able to be used in WHERE clauses with 9.(4?) — did I dream this? ‘Cause that would make KNN calcs so important for point cloud manipulation really easy.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.