2
私は、関連性のある方法と地区の境界線を追加したいと思います。 私は次のことを試みたが、アップ捕まってしまった:get_osm {osmar}でRでオープンストリートマップを使用する
require(osmar)
require(XML)
# a set of open street map ways (lines) related as given by a relation..
# (if connected these ways represent the boundary of a political
# district in Tyrol/Austria)
myxml <- xmlParse("http://api.openstreetmap.org/api/0.6/relation/85647")
# extracting way ids at the according xml-nodes:
els <- getNodeSet(myxml, "//member[@ref]")
ways <- as.numeric(sapply(els, function(el) xmlGetAttr(el, "ref")))
# now I try to get one of those ways as an osmar-obj and plot it,
# which throws an error:
plot_ways(get_osm(way(ways[1])))
どうやらそこに欠けてバウンディングボックスのだが、私は、オブジェクトのこの種に割り当てる方法がわからない..私はこの問題が解決されたら、私はしたいのですが1つのポリゴンを線からはずします。