我正在尝试使用python中的pdal。我从一个超级简单的裁剪开始:
json = """{
"pipeline":[
"ARRA-LFTNE_NewYork_2010_000636.las",
{
"type":"crop",
"bounds":"([616766.770,617765.46],[4510733.640,4511649.800])"
},
"output.laz"
]
}"""
pipeline = pdal.Pipeline(unicode(json,encoding="utf-8"))
pipeline.validate() # check if our JSON and options were good
pipeline.loglevel = 8 #really noisy
count = pipeline.execute()
arrays = pipeline.arrays
metadata = pipeline.metadata
log = pipeline.log
json来自pdal的惠普https://www.pdal.io/pipeline.html#pipeline,只需对图像进行裁剪即可。但是,在验证时,它会失败,并显示以下错误:
Traceback (most recent call last):
File "/src/test.py", line 69, in <module>
pipeline.validate() # check if our JSON and options were good
File "/usr/local/lib/python2.7/dist-packages/pdal/pipeline.py", line 42, in validate
return self.p.validate()
File "pdal/libpdalpython.pyx", line 93, in pdal.libpdalpython.PyPipeline.validate (pdal/libpdalpython.cpp:2639)
RuntimeError: Couldn't create filter stage of type 'crop'.
我已经尝试运行我在网上找到的其他小示例,但我一直收到“the‘t create filter stage of type xx"-error!
我在镜像中的dockerfile上运行它: pdal/pdal:1.5
发布于 2017-05-09 04:58:47
再次查看您链接的站点。crop
滤镜(docs here)使用选项bounds
而不是dimension
来指定边框。在PDAL
中,dimension
指点数据的维度(X、Y、Z、红色、绿色、蓝色等)。
发布于 2018-06-09 04:14:18
您的筛选器type
应该读取filters.crop
,而不仅仅是crop
。
https://stackoverflow.com/questions/43845930
复制相似问题