0

I've applied SOR filter using PDAL python.Below is the code snippet of the same,

json =  
 """  
{  
  "pipeline":[  
    "D:/Lidar_collect_3/output/output_1.las",  
    {  
      "type":"filters.outlier",  
      "method":"statistical",  
      "mean_k":6,  
      "multiplier":1.0  
    },  
    "D:/Lidar_collect_3/output/output.las"  
  ]  
}  
"""  

pipeline = pdal.Pipeline(json)  
pipeline.validate()  
pipeline.execute()

The output.las created has the same number of points as input(looks same as the input). I've tried with different mean_k and multiplier values, but no result.

Where did I go wrong ?

0

I think your json is being interpreted as a string rather than as a json object. Try importing the json library (part of the standard Python library) and then loading the string as a json object. For example:

import json
json_string = """  
{  
  "pipeline":[  
    "D:/Lidar_collect_3/output/output_1.las",  
    {  
      "type":"filters.outlier",  
      "method":"statistical",  
      "mean_k":6,  
      "multiplier":1.0  
    },  
    "D:/Lidar_collect_3/output/output.las"  
  ]  
}  
"""  

json_pipeline = json.loads(json_string)
pipeline = pdal.Pipeline(json_pipeline)  
pipeline.validate()  
pipeline.execute()

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.