有你的重新啓動R?它看起來像滲透不在你的道路上,雖然你確實提到你設置了它。請確保您可以在終端運行滲透的一個命令:
osmosis --read-xml SloveniaGarmin.osm --tee 4 --bounding-box left=15 top=46 --write-xml SloveniaGarminSE.osm --bounding-box left=15 bottom=46 --write-xml SloveniaGarminNE.osm --bounding-box right=15 top=46 --write-xml SloveniaGarminSW.osm --bounding-box right=15 bottom=46 --write-xml SloveniaGarminNW.osm
的例子是無關緊要的,只要它沒有說找不到osmosis
文件。
此外,請確保您的路徑中有gzip
。我幾乎可以肯定它是默認的,但demo
軟件包依靠它運行。只要打開一個終端並鍵入gzip
以確保它在那裏。
最後,如果你需要調試這一點,那麼運行這個命令:
library(osmar)
download.file("http://osmar.r-forge.r-project.org/muenchen.osm.gz","muenchen.osm.gz")
system("gzip -d muenchen.osm.gz")
# At this point, check the directory listed by getwd(). It should contain muenchen.osm.
src <- osmsource_osmosis(file = "muenchen.osm",osmosis = "osmosis")
muc_bbox <- center_bbox(11.575278, 48.137222, 3000, 3000)
debug(osmar:::get_osm_data.osmosis)
get_osm(muc_bbox, src)
# Press Enter till you get to
# request <- osm_request(source, what, destination)
# Then type request to get the command it is sending.
後鍵入回車一次,然後request
你會得到它發送到您的操作系統的字符串。它應該是這樣的:
osmosis --read-xml enableDateParsing=no file=muenchen.osm --bounding-box top=48.1507120588903 left=11.5551240885889 bottom=48.1237319411097 right=11.5954319114111 --write-xml file=<your path>
嘗試粘貼到您的終端。它應該從任何目錄工作。
唉,並輸入undebug(osmar:::get_osm_data.osmosis)
停止調試。鍵入Q
退出調試器。