2

I am trying to use PDAL (in Python) to extract metadata from a LiDAR point cloud (.las). I am using the "pdal info" command and applying different flags (e.g. -metadata, -stats) to get additional information on the dataset, but I would like to know if it is possible to obtain the point spacing of a LAS point cloud using PDAL?

I initially thought I had the correct information in the scale_x, scale_y, scale_z values returned via "pdal info -metadata", but upon reading more about PDAL my understanding now is that these are scaling factors and not the actual point spacing.

Is point spacing actually retrievable via PDAL?

4
  • 1
    What do you mean by spatial resolution? The linear spacing between the points?
    – JRR
    Oct 14, 2020 at 0:06
  • 1
    JRR - To clarify, I actual want to retrieve the lidar point spacing in x,y, and z (if possible). I am continuing to explore PDAL's utility for this, but cannot seem to find anything to exploit this metadata. Any assistance is most appreciated, I edited to original post to further clarify.
    – mdl518
    Oct 14, 2020 at 1:11
  • 2
    A point cloud is not a raster. There is no fixed point spacing. You can compute the average distance to the nearest neighbor for each point to get an idea of the average distance between point but this is not something constant. What kind of point cloud do you have.
    – JRR
    Oct 14, 2020 at 1:41
  • 1
    Point spacing is a target parameter in an acquisition. The best way to quantify average point spacing is to grid the count of first returns to 1 meter giving you number of pulses per square meter thus, pulse spacing. With discrete return data you only want to look at first returns as, all others are part of that first pulse and if included would inflate post spacing. Return density is different than post spacing. Oct 14, 2020 at 2:23

1 Answer 1

3

pdal info will report summary statistics (source):

pdal info --boundary /Users/me/test/data/las/autzen_trim.las

{
  "boundary":
  {
    "area": 746772.7543,
    "avg_pt_per_sq_unit": 22.43269935,
    "avg_pt_spacing": 2.605540869,
    "boundary": "MULTIPOLYGON (((636274.38924399 848834.99817891, 637242.52219686 848834.99817891, 637274.79329529 849226.26445367, 637145.70890157 849338.05481789, 637242.52219686 849505.74036422, 636016.22045656 849505.74036422, 635983.94935813 849114.47408945, 636113.03375184 848890.89336102, 636274.38924399 848834.99817891)))",
    "boundary_json": { "type": "MultiPolygon", "coordinates": [ [ [ [ 636274.38924399, 848834.99817891 ], [ 637242.52219686, 848834.99817891 ], [ 637274.79329529, 849226.26445367 ], [ 637145.70890157, 849338.05481789 ], [ 637242.52219686, 849505.74036422 ], [ 636016.22045656, 849505.74036422 ], [ 635983.94935813, 849114.47408945 ], [ 636113.03375184, 848890.89336102 ], [ 636274.38924399, 848834.99817891 ] ] ] ] },
    "density": 0.1473004999,
    "edge_length": 0,
    "estimated_edge": 111.7903642,
    "hex_offsets": "MULTIPOINT (0 0, -32.2711 55.8952, 0 111.79, 64.5422 111.79, 96.8133 55.8952, 64.5422 0)",
    "sample_size": 5000,
    "threshold": 15
  },
  "filename": "\/Users\/acbell\/pdal\/test\/data\/las\/autzen_trim.las",
  "pdal_version": "1.6.0 (git-version: 675afe)"
}
5
  • Thanks, Aaron, most helpful! This is exactly what I was looking for, but do you have any insights regarding the difference between the "avg_pt_per_sq_unit" and "density"? I am assuming that we can equate the avg_pt_per_sq_unit to a density (e.g. pts per sq. meter) but I do not know what the density field shown above represents.
    – mdl518
    Oct 14, 2020 at 16:40
  • I'm afraid not, the documentation is lacking on this. I have been using lidR in R to work with point cloud data recently so I have not really dug into this tool's outputs. It would be worth investigating which points (e.g first returns) are used to generate the stats as well as the threshold value.
    – Aaron
    Oct 14, 2020 at 16:44
  • @Aaron just piggybacking on OP: how would one get the SRS to be able to then interpret the line/samples? I've looked around on GSE a lot on this and haven't found a real good, stable, updated answer.
    – auslander
    Oct 16, 2020 at 14:34
  • @auslander your comment sounds like a good candidate for a new question. You'll get a better answer than what I can provide in the comments.
    – Aaron
    Oct 16, 2020 at 15:25
  • 1
    avg_pt_per_sq_unit == per square unit (tessellated area within inclusions) density == Number of points per square unit (total area) See github.com/PDAL/PDAL/blob/… for the calculations. Oct 23, 2020 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.