[pdal] [PDAL] PGPointCloud: Updating point info

Howard Butler howard at hobu.co
Wed May 11 09:12:12 PDT 2016


> On May 11, 2016, at 11:03 AM, Jean-Francois Prieur <jfprieur at gmail.com> wrote:
> 
> Hello,
> 
> Newbie to PostGIS/PGPointCLoud, used to work with MySQL many moons ago so know just enough to be dangerous!
> 
> I am working in remote sensing research , precision forestry to be specific.
> 
> We use ALS data and tree crown segmentation on the resulting canopy height models to segment individual trees. We then use the shapefile to extract the points from the las files. This is done using Python, it works but it is a slow process and we have to redo it when we want to update the info on our points.
> 
> We are looking into doing a lot of this in PostGIS and have succesfully imported our las files using the awesome documentation provided. So we have a working pipeline LAS->PDAL->pgPointCloud and can perform all kinds of queries on the data so that part works.
> 
> We can do the spatial join between the shapefiles containing all our individual crowns (there can be thousands) and then extracting all the points under those. What we would like to do is update all the points selected under a crown with that crowns ID so we do not have to do these spatial joins all the time eg. we can just query the crown number and get the points that way. We can select all the points, we just cannot update the points with the proper info. The spatial join is quite long with thousands of crowns, we would like to only run it once, update the points with the proper crown ID and then work with the data that way.
> 
> I believe part of the solution is the shema used in the pipeline process, I think we would have to add a field in a new schema for the crownid which could then be updated with the crown id. Just not quite sure how to get there.
> 
> Not afraid to learn on my own and digging in, just in need of a push in the right direction!

Ok, let me attempt to rephrase. You want to update some kind of classification or other attribute for each point in a pgpatch that is inside a crown polygon? I think what I would do is ingest the crown shapefiles into PostGIS, enable the pointcloud_postgis extension, and then write SQL to update the points inside the crown polygons. There is very likely a Classification attribute as part of your data, and I would just repurpose that to flag points as your tree crowns in some way. Is this on the right track?

Also, make sure your read Stephen Mather's blog posts on pgpointcloud and PDAL. He's doing something very similar to your usage and there might be some pointers in there https://smathermather.wordpress.com/tag/pdal/

Howard


More information about the pdal mailing list