1

I'm new to using the PDAL system to query and process LiDAR point cloud data from the USGS Lidar Explorer. I've been following some of the tutorials in the PDAL Quickstart Guide and have applied the process to a couple of test areas with success. However, when I attempt to apply the process to read data from EPT, using the tutorial I get the response

PDAL: filters.smrf: SomeNumberOfReturns or ReturnNumber values were 0, but not all. Check that all values in the input file are >1

The Python script then exits and no output is written.

The only things I've changed from the tutorial are the "bounds", and the "filename" for the input. My best guess is that the process of wiping the existing point classification in "filters.assign" is not completely wiping the classes, but that a complete guess.

My pipeline is shown below, and I'm implementing it in an ArcGIS Pro Conda environment using the call to pdal pipeline "C:/Path/to/my/script/here.json" --debug

    {"pipeline":[{
    "type":"readers.ept",
    "filename":"http://usgs-lidar-public.s3.amazonaws.com/MA_CentralEastern_1_2021/ept.json",
    "bounds":"([-7917342.6030054735,-7907983.316102504],[5210805.384680403,5218695.031491172])",
    "tag": "readdata"
},
{
    "limits": "Classification![7:7]",
    "type": "filters.range",
    "tag": "nonoise"
},
{
    "assignment": "Classification[:]=0",
    "tag": "wipeclasses",
    "type": "filters.assign"
},
{
    "out_srs": "EPSG:26915",
    "tag": "reprojectUTM",
    "type": "filters.reprojection"
},
{
    "tag": "groundify",
    "type": "filters.smrf"
},
{
    "limits": "Classification[2:2]",
    "type": "filters.range",
    "tag": "classify"
},
{
    "filename": "C:\\Users\\wik191\\Downloads\\bostonarea.tif",
    "gdalopts": "tiled=yes,     compress=deflate",
    "inputs": [ "classify" ],
    "nodata": -9999,
    "output_type": "idw",
    "resolution": 1,
    "type": "writers.gdal",
    "window_size": 6
}
]
}

1 Answer 1

5

You probably have some points in the dataset that have ReturnNumber and/or NumberOfReturns == 0. Here's a filter config that will hammer those to 1 so things can move forward:

{
    "type": "filters.assign",
    "value": [
      "ReturnNumber = 1 WHERE ReturnNumber < 1",
      "NumberOfReturns = 1 WHERE NumberOfReturns < 1"
    ]
  }
3
  • thank you for providing that filter. In general terms if the first return is object nearest the sensor, is a point labeled as a 0th returns generally noise or some other error? Thank you for the clarification
    – W. Kessler
    Commented Apr 3, 2023 at 14:46
  • 1
    Points labeled as 0th returns are invalid according to the LAS specification. No idea why you have points with them in there but some software doesn't respect that. filters.smrf absolutely depends on that to help it figure out multi-return geometry, however. Commented Apr 3, 2023 at 21:25
  • That's what I thought. I'm going to see if I can write out the LAS and see if I can pinpoint those 0th classified ones.
    – W. Kessler
    Commented Apr 5, 2023 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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