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