【问题标题】:Using Osmosis to filter OSM XML tags使用 Osmosis 过滤 OSM XML 标签
【发布时间】:2011-08-28 20:41:14
【问题描述】:

我正在使用 .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

但是,在尝试这样的代码时,我收到一个语法错误,指出:Argument does not contain a name before the '=' (i.e. name = value)。

有什么建议吗?

【问题讨论】:

    标签: xml filter tags openstreetmap


    【解决方案1】:

    首先“=”前后不能有空格:

    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"
    

    这可能有效。 但它没有经过测试。 不久前,因为我使用了那个管道;)

    【讨论】:

      猜你喜欢
      • 2013-02-24
      • 1970-01-01
      • 2019-11-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-31
      • 1970-01-01
      相关资源
      最近更新 更多