我正在处理.osm文件,并试图根据标签过滤实体。我只需要查看包含源标签和属性标签的实体。我使用以下代码成功地过滤了所有的源标签:
osmosis --read-xml file = "northern_ireland.osm" --way-key-value keyValueList="source" --used node --write-xml northern_ireland_source.osm在另一个教程中,我注意到我需要使用一个管道:http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage_0.38
因此,我做了以下工作:
osmosis --rx northern_ireland.osm --accept-ways source=* outPipe.0 = SOURCE然而,在尝试这样的代码时,我得到了一个语法错误:参数不包含'=‘前面的名称(即name = value)。
有什么建议吗?
发布于 2011-09-06 16:36:49
首先,“=”前后可能没有空格:
outPipe.0=SOURCE第二个IIRC outPipe.0是--rx的参数:
osmosis --read-xml file="northern_ireland.osm" outPipe.0="SOURCE" \
--tf accept-ways source=* inPipe.0="SOURCE" outPipe.0="step1" \
--tf accept-ways attribution=* inPipe.0="step1" outPipe.0="step2" \
--write-xml file="northern_ireland_source.osm" inPipe.0="step2"这可能会奏效。但它没有经过测试。我已经有一段时间没有用过那些管子了;)
https://stackoverflow.com/questions/7223792
复制相似问题