PDAL筛选器不起作用:无法解析管道

时间:2019-08-05 20:35:00

标签: python python-3.x pdal

所以这是我第一次使用PDAL。我使用python 3.6和PDAL 1.9。

 json_s = """{


        "test.las",
        {
        "type":"filters.outlier",
        "method":"statistical",
        "mean_k":12,
        "multiplier":0.5
        },
        {
        "type":"filters.range",
        "limits":"Classification![7:7]"
        },
        "testOut.las"

}"""

pipeline = pdal.Pipeline(json_s)
count = pipeline.execute()

显示错误

RuntimeError: JSON pipeline: Unable to parse pipeline. 

我在网站上检查了示例代码,它看起来一样。只是不知道为什么它不起作用?

1 个答案:

答案 0 :(得分:0)

PDAL格式如下:

json_s = """{

 "pipeline":[
        "input.las",
        {
          #anything you need
        },

        "output.las"
       {
       }
    ]
}"""

根据您的情况,尝试:

json_s = """{

 "pipeline":[
        "test.las",
        {
        "type":"filters.outlier",
        "method":"statistical",
        "mean_k":12,
        "multiplier":0.5
        },
        {
        "type":"filters.range",
        "limits":"Classification![7:7]"
        },
        "testOut.las"
    ]
}"""