1

I'm installing python pdal on my new Mac. This Mac runs python 3.6 and anaconda has been already installed. While trying to install pdal using command line "pip install pdal" which is recommanded by pdal documentation, I got error msg: No such file or directory: 'pdal-config': 'pdal-config'

Then I'm trying to build a new environment in Anaconda and download pdal, which is suggested by a forum user. So I used command "conda create -n pdalenv -c conda-forge python-pdal". Everything goes well and pdal can be imported in Jupyter notebook. However, I got error msg when using pdal to process a LAS file: RuntimeError: filters.smrf: No returns to process.

In fact, I have another old computer which installed pdal correctly and no error occurs when I run my python code.

I've seen someone else suggests to use brew install to deal with it, but I haven't tried that yet. I don't wanna make my computer environment a mess.

So I just wait here to see if someone has a good idea dealing with it. Or could someone tell me how to do it correctly? The python code is:

pip = json.dumps(
{
"pipeline": [
"../data/p2.las",
{
  "type":"filters.smrf"
},
{
  "type":"filters.hag"
},
{   "type":"filters.eigenvalues",
        "knn":16},
{   "type":"filters.normal",
        "knn":16}
]})        
pipeline = pdal.Pipeline(pip)
pipeline.validate()
p = pipeline.execute()
Yun Zhao
  • 135
  • 1
  • 9
  • Could you post the output from `conda info` and `conda list`? That will help to provide an answer to the conda attempt. – chambbj Jan 01 '19 at 16:58

2 Answers2

0

You should take a look at the return information in your input point cloud. The default behavior of SMRF is to process last-of-many (ReturnNumber == NumberOfReturns > 1) and only (NumberOfReturns == 1) returns. If it finds no points meeting these criteria, then it has nothing to process.

You could pass "returns":"first,last,intermediate,only" as an additional option on the filters.smrf stage to instruct it to process all of the points.

chambbj
  • 168
  • 1
  • 1
  • 5
  • Yes, I've considered this issue already. But it looks strange since my old computer can work smoothly and the new mac has nothing to return, with the same input las data and the same python program. – Yun Zhao Jan 02 '19 at 03:07
  • I suspect you are running different versions of PDAL between the two instances. If you could provide further detail (e.g., `pdal --version`, `conda list`) for the working and non-working instances, it could help us to troubleshoot further. – chambbj Jan 03 '19 at 13:44
0

Finally, I solved my problem by cloning the old Mac to my new Mac. Anyway, I can work on my new Mac and PDAL package can be imported and is working smoothly.

Thanks all who viewing my question and responding to it.

Best, YUN ZHAO

Yun Zhao
  • 135
  • 1
  • 9