Question

I have lidar files that contain millions of points each. I am trying to filter these lidar files with shapefiles that contain polygons, basically doing an intersect or contain between each of the points with the polygons.

I am new to lidar so every suggestion for open source libraries for those spatial clipping actions will be good enough.

No correct solution

OTHER TIPS

PDAL contains a filter than can crop points based on a geometric extent. The cropping polygon is expected to be in WKT. http://www.pdal.io/apps.html#translate-command contains an example that uses a inline WKT polygon to crop a file. A simple example looks like this:

pdal translate --polygon="((0 0, 10 0, 10 10, 0 10, 0 0))" infile.las outfile.las

You can also use a file on your filesystem in WKT in place of the string:

pdal translate --polygon=mywktfile.wkt infile.las outfile.las

PDAL is free and open source, and can be installed on various systems; unfortunately the install documentation is a bit, uh, sparse. I've listed my personal opinion of the easiest way to get PDAL up and running on various systems:

  • Windows: OSGeo4W includes a recent version (1.0.0b1-1) of PDAL in its 64bit installer (I haven't personally tried this one, so can't speak to its effectivity)
  • OSX: use homebrew, brew install pdal
  • Other systems you'll have to build from source (caveat emptor, those install directions might be out-of-date)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top