【发布时间】:2017-05-02 21:07:59
【问题描述】:
我想通过高速公路为OpenStreetMap 过滤PBF file。例如highways = residential。我是OpenStreetMap 的新手。我阅读了一些信息并开始使用这些工具来获得结果,它们是osmfilter、osmconvert、osmosis
阶段:
1) 我将 pbf 文件转换为 osm,以便在 osmconvert 中使用它。例如:osmconvert norway.pbf >norway.osm
2) 我通过 osmfilter 过滤 osm 文件,得到 pbf 格式的结果文件。例如:osmfilter norway.osm.pbf --keep="highway=primary =secondary waterway=river" >streets.osm
3) 最后,我通过 osmosis 处理过滤后的 pbf 文件
我的问题是过滤后的 pbf 文件采用 application/xml 格式,但 osmosis 适用于 application/octet-stream 格式的 pbf 文件。如何解决?或者哪种过滤方法更好?可能我需要将application/xml 格式更改为application/octet-stream。怎么做?
【问题讨论】:
标签: openstreetmap osmosis osmfilter