Hot answers tagged

8

libLAS was developed to provide read/write support for LAS and it was modeled on LAStools which at the time was not released under an open source license. In the subsequent years, many parts of LAStools were released under an open source license which negated the need for a parallel effort in libLAS. The library portion of this is called LASlib. Yes, I agree ...


8

The answer by Howard Butler pretty much sums it up. Some more background. When I created the first LAStools and the LASlib library that the tools are build upon I was a postdoc at UC Berkeley and merely needed to prepare LAS files as input for my research on Streaming Delaunay (or Streaming TIN) processing. Because the code seemed useful on its own I zipped ...


7

PDAL doesn't provide anything like FUSION's "GridMetrics" at this time. We've been interested in useful statistics or metrics that PDAL could compute for algorithm builders, but we haven't gotten around to implementing anything yet. It would be straightforward to implement a custom PDAL stage to compute these. It will be more productive to ask on the mailing ...


6

The PDAL PCD Writer can write .pcd files. For it to work, you must have linked the PCL libraries at compile time. The PDAL OSGeo4W build does not have PCL support. If you are unable to build PDAL with PCL support yourself, one possibility is to use PDAL's Docker containers to achieve your task -- those have PCL linked. Then, simply run pdal translate: ...


6

You downloaded the source code, not a prebuilt binary. If you read the PDAL download page you linked to you will see: Binaries ... Windows Windows builds are available via Conda Forge (64-bit only). Install Conda (or Miniconda), run a Conda shell, install PDAL with conda install -c conda-forge pdal and you should be good to go. See ...


5

After all, it made sense. A flat plane can have 2 normals. In this case, the slight wobble of the rotating sensor made some points a little above and some points below the average plane. Hence the kind of artifacts you see. Solution: Since we know a roof always has an upward pointing normal, we can check that whenever the normalz is negative, we flip the ...


4

First, for the answers proposed here, you probably do not want to use the ferry filter to push HeightAboveGround to Z, at least not prior to segmentation, as the act of normalizing heights involves subtracting an interpolated estimate of the ground elevation from each return. Something planar in the original X, Y, Z space may no longer be planar in the ...


4

The filters.voxelgrid filter requires PCL support, which it doesn't appear you have linked. On OSX, Homebrew PCL (1.7.2) should be sufficient. See my configuration script for hints on how to have CMake use it. Another easy way to get going with PDAL is to use Docker. It contains a fully-featured PDAL build. The PDAL Docker latest image based on last stable ...


4

I ended up with this solution with PDAL and GDAL: First I used liblas to create LAS containing only ground points. Then I used PDAL similar to the "Basic Example" but with output_type: max to create a DTM from the terrain LAS and a DSM from the original LAS. Then just gdal_calc.py with these to elevation models to get a DHM. gdal_calc.py -A DSM.tif -B ...


4

In addition to what has been mentioned above, SPDLib is another powerful set of open-source tools for processing LiDAR data (LAS files). It is cross-platform and supports Mac. The spdinterp program has the capability to generate Canopy Height Models as well as DTMs and DSMs.


4

1) You can use the the little known Whitebox GAT (Mac version, Download Whitebox Geospatial Analysis Tools), developed for the Java platform (Java Runtime Environment (JRE) version 8.0 or higher installed) and Open Source (GNU General Public License version 3) Look at Working with LiDAR data in Whitebox GAT 2) You can also use GRASS GIS (GRASS GIS for ...


3

Seems like you should get to know Python's built-in subprocess module. Among other things, it enables you to make command line calls from inside a script and capture the results. import subprocess import json from shapely.geometry import Polygon result = subprocess.run(['pdal', 'info', '/path/to/file.ply'], stderr = subprocess.PIPE,...


3

BPF is rather new as a public format. PDAL supports both reading and writing BPF data. You can use the OSGeo4W64 build of PDAL to translate the data into LAS 1.4 using the following command: pdal translate simple-extra.bpf out.las \ --writers.las.minor_version=4 \ --scale 0.01,0.01,0.01 PDAL will write commonly-named dimensions, such as XYZ into ...


3

There was a bug in the PMF filter that has been fixed in newer versions of PDAL that was causing this. Try PDAL 1.1+ to get past this issue. If you still have trouble, please ask on the mailing list.


2

My guess would be that the data is unprojected latitude longitude (usually WGS84, EPSG:4326), stored in radians. The precision of the SBET translation is therefore a bit low to give useful coordinates. 0.933 times 180° divided by PI --> 53.457° -0.159 times 180° divided by PI --> -9.110°


2

(pdal pipeline readers.las Warning) C:/denoise\lake.las: Found invalid value of '0' for point's return number. '0' is not a valid return number in LAS, and PDAL is just warning you here about it. It should pass it on through without touching it though.


2

You could consider using SPDLib, which has a command called spdmetrics. It can be used to simultaneously calculate multiple vegetation metrics and output them in either raster or vector formats (individual polygons). There is a tutorial available here that explains how the metrics can be calculated and this XML file provides a full list of the metric ...


2

There are two additional options to identify trees from canopy height models. Both of these options will identify (mostly) trees, which you can then use as a mask to isolate buildings. lastrees in the R lidR package. There is a good tutorial on tree segmentation from the author of the package. FUSION's TreeSeg algorithm (p.138 documentation)


2

As commented here, if you get error: PDAL: Couldn't create writer stage of type writers.pcd Basically it says, there is no PCL plugin. Hence, you should show library or rebuild PDAL with PCL plugin option to check for build. First check, pdal --drivers There must exist writers.pcd Write data in the Point Cloud Library (PCL) format. If the plugin ...


2

This kind of pipeline isn't supported at the moment, but we do have a ticket discussing how to do so. There's another way that might be relevant to you. You can use the combination of filters.assign and filters.groupby to grab you polygons from an OGR-readable data source. Presumably you're having to do that to get your WKT anyway, so maybe this will make ...


2

This is cross-posted at the PDAL GitHub issue tracker. If you take a look at this table in the downloads section of the PDAL documentation, you will see that CPD is unfortunately not supported in the Conda package. You will need to build PDAL from source. Dependencies can still be obtained via Conda (although CPD adds a couple of additional dependencies, ...


2

As HowardButler stated you need to use the JSON option for any PDAL version over 1.5. I am using PDAL version 1.7.2 and PostGreSQL version 9.6. 1) Create a text file using NotePad as described below. This particular JSON script reads from a standard .LAS file and writes to a PostGreSQL database table. The PostGreSQL database has the pointcloud and postgis ...


2

The problem is that localhost inside of your Docker container refers to the container, not the host where Postgres is running. If you add --net=host to your docker run commend, then your Docker container will use the host's networking stack, and localhost will work as you expect.


2

I finally came up with a solution thanks to a colleague who told me to use GREP. For each LAS file (in a loop I used these lines of code): pdal info ${f} > ${f}_lasinfo.json MAXX=`grep "maxx" ${f}_lasinfo.json | sed -e 's/[^0-9.]//g'` MAXY=`grep "maxy" ${f}_lasinfo.json | sed -e 's/[^0-9.]//g'` MINY=`grep "miny" ${f}_lasinfo.json | sed -e 's/[^0-9.]//g'...


1

So the line which does the job is: sudo docker run --net=host -v /home/user/Documents/projectX:/data pdal/pdal:1.7 pdal pipeline /data/laz2pg.txt


1

the -v option maps the directory /data on the container to the directory /home/user/Documents/projectX on your host machine. It's just like having a shared folder with a virtual machine. That means that when you call pdal info /data/pt.las it's expecting to find a pt.las in the /home/user/Documents/projectX directory. As you won't have put in las2pg in ...


1

The OSGeo4W shell sets up its own environmental variables at launch. So its own Python paths and other paths. This allows it to work even in complex environments with other software like ArcGIS installed on the computer. I would guess that you did not install PDAL through the OSGeo4W shell? Install it through there and the command should work. Or just run ...


1

I got answer here. After adding pipeline.execute(), now the code is running and creating exactly the same output as original one (not filtering out the noise). As this code is for airborne lidar, now I think I need to try different parameters to make a code remove the noise in ground lidar.


1

pdal translate requires the filter type voxelgrid. The correct syntax is as follows: $ pdal translate -i /Users/aaron/temp/1958-09-54.laz -o /Users/aaron/temp/1958-09-54-thinned.laz voxelgrid --filters.voxelgrid.leaf_x=4.5 --filters.voxelgrid.leaf_y=4.5 --filters.voxelgrid.leaf_z=4.5


1

Actually this IS formatted correctly. My .las file from ODM needed to be reprojected into 4326 prior to this.


Only top voted, non community-wiki answers of a minimum length are eligible