Python filters.programmable中pdalargs的语法是什么?
我将pdal与python结合使用,并尝试使用可编程过滤器。根据本文,我应该能够通过编写第141页来解析python函数的其他输入参数Python filters.programmable中pdalargs的语法是什么?,python,point-clouds,Python,Point Clouds,我将pdal与python结合使用,并尝试使用可编程过滤器。根据本文,我应该能够通过编写第141页来解析python函数的其他输入参数 { "pipeline":[ "input.las", { "type":"filters.programmable", "module":"anything", "function":"filter", "source":"a
{
"pipeline":[
"input.las",
{
"type":"filters.programmable",
"module":"anything",
"function":"filter",
"source":"arguments.py",
"pdalargs":"{\"factor\":0.3048,\"an_argument\":42, \"another\": \"a string\"}"
},
"output.las"
]
}
我尝试了复制粘贴,实际上,我只更改了输入las文件的名称,并且不断出现以下错误:
RuntimeError: JSON pipeline: Unable to parse pipeline:
* Line 13, Column 15
Missing ',' or '}' in object declaration
我尝试在pdalargs参数中随机删除和插入and,\n,但语法似乎不正确。它在没有PDALARG的情况下工作正常
是否有更新或文档中没有的内容??语法实际上应该如何使用pdalargs 我发现了如何更改语法。出现此问题的原因可能是我在python脚本中以字符串形式编写json代码 无论如何,这种语法似乎有效:
jsonStr = """{
"pipeline":[
"input.las",
{
"type":"filters.programmable",
"module":"anything",
"function":"filter",
"source":"arguments.py",
"pdalargs": {"factor":0.3048,"an_argument":42, "another": "a string"}
},
"output.las"
]
}"""
如果其他人也有同样的问题,希望这能有所帮助