OpenStreetMap(OSM)歷史數據下載

轉載:https://blog.csdn.net/qq_912917507/article/details/85057400

首先的一個疑問,OSM上有歷史數據嗎?有的話,去那裏下載?

方法一

官方網址https://planet.openstreetmap.org/planet/full-history/

官方的方法不推薦

需要注意的事,你一次就將會把全球的歷史存檔數據下載下來

而且數據轉換速度慢到令人髮指,時間上也就保留5年

bzip2 -cd full-planet-110115-1800.osm.bz2 | bzip2 -c> full-planet.new.osm.bz2
這可能需要很長時間(在具有8GB RAM的2.66Ghz Intel Core i7上大約需要36小時)。生成的文件將略小於原始文件。

此處找到的文件是OpenStreetMap.org數據庫的完整副本,包括編輯歷史記錄。這些是在Open Data Commons Open Database License 1.0許可下發布的。

完整的歷史行星文件包含XML和自定義PBF格式的OpenStreetMap數據庫的完整編輯歷史記錄。

方法二

http://download.geofabrik.de/asia/china.html#

可以下載整個國家,時間從140101到現在,可以直接下載shp格式,還算不錯

務必點一下raw directory index

方法三

使用Osmium工具(沒有實測,不知效果)

Osmium lets you extract data from OSM history files for a given point in time or a time range or a polygon or a bounding box. See osmium-tools and its extract command which can handle history dump files in various formats (see the --with-history option).

Osmium允許從OSM歷史文件中提取給定時間點、時間範圍、多邊形或邊框的數據。參見鋨工具及其提取命令,該命令可以處理各種格式的歷史轉儲文件(請參見—with-history選項)。

工具說明

https://wiki.openstreetmap.org/wiki/Osmium

多種語言可以選擇

實例EXAMPLES

https://docs.osmcode.org/osmium/latest/osmium-time-filter.html

Extract current planet file from history planet:

從歷史行星中提取當前行星文件:

osmium time-filter -o planet.osm.pbf history-planet.osh.pbf
Extract planet data how it appeared on January 1 2008 from history planet:

從歷史行星中提取行星數據2008年1月1日它是如何出現的:

osmium time-filter -o planet-20080101.osm.pbf history-planet.osh.pbf 2008-01-01T00:00:00Z
 有用過的朋友可以給我們講一講

歡迎互相交流學習,作者微信 w912917507


--------------------- 
作者:小猿猴GISer 
來源:CSDN 
原文:https://blog.csdn.net/qq_912917507/article/details/85057400 
版權聲明:本文爲博主原創文章,轉載請附上博文鏈接!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章