JA:Planet.osm

From OpenStreetMap Wiki
Jump to navigation Jump to search

broom

Help (89606) - The Noun Project.svg

Planet.osm は1つのファイルにまとめられた OpenStreetMap のデータです。私たちの地図を構成するすべてのノード、ウェイ、リレーションが含まれます。新しいバージョンは毎週リリースされています。これは巨大なファイルです(2022-08-01時点で XML 形式では圧縮前で1620.6 GB、 bzip2圧縮で117.8 GB、 PBF で64.4 GBです。)

大陸、国、都市エリアなどで抽出された OpenStreetMap データを収めた Extracts と呼ばれるファイルもあります。

形式

PBF または圧縮された OSM XML の2つの主要な形式があります。 PBF はバイナリ形式で、ダウンロードサイズが小さく処理がはるかに速いので、可能であれば使用してください。 OSM データを使うほとんどのツールは PBF に対応しています。

すべての OSM ファイル形式の概要は、 OSM file formats で見られます。

もし古い GIS をお使いの場合は、 Processed data providers を見た方がよいかもしれません。

ダウンロード

ダウンロードを容易にするツール(すべてのミラーを一度に使用するオプション、md5 ハッシュの検証を自動的に行う機能など)については、データのダウンロードを参照してください。

BitTorrent

2020年11月現在、トレントファイルが公式に公開されています!

BitTorrent client がインストールされていれば、興味のあるフォルダ(pbf/など)に移動して .torrent ファイルをクリックするだけです!

BitTorrent RSS/Atom フィード

OSMはBroadcatching対応しました!

If you have bandwidth and disk space as well as BitTorrent client which supports Broadcatching (RSS), and would like to help with reducing load on OSM servers and improving download speeds for everyone, please join the BitTorrent swarm by using following RSS feeds (first and second are probably the most popular, but it you have resources please do share all of them):

There is no pressing need to continue seeding old files after a month, unless you really want to (the most help is in first 7-14 days).

If your client does not support RSS, but you run a GNU/Linux system, you can use scripts like https://github.com/osm-hr/planet-mirror in your cron to automate joining the BitTorrent swarm and removing old planet files.

Planet.osm ミラーサイト

セキュリティ上の理由から、HTTPSソースを使用できる場合は、HTTPやFTPではなく、HTTPSの使用を検討してください。インターネットアクセス(特にモバイルアクセス)がIPv6のみのネイティブルーティングを提供し、IPv4がISPによってプロキシ経由の一時的なNATセッション(HTTPSが使用されていても、非常に大きなファイルのダウンロードには信頼できない場合があります)でのみサポートされている場合、IPv4のみのソースで問題が発生する可能性があるインターネットユーザーもいます。

ミラーサイトでは、IPv6からの接続をサポートし、ソースを確実に認証するために安全なプロトコルをサポートすることが推奨されます(データが公開されるため暗号化は必要ありませんが、サーバー側の証明書をインストールし、期限が切れる前に定期的に更新することが必要です)。これらのソースでの RSYNC のサポートは、他のローカルミラーへの高速な増分同期を可能にするためにも有用であり、同様にセキュリティが確保されている必要があります 。いくつかのミラーは、アクティブな webseedsとして BitTorrent プロトコルによるピアツーピア配信もサポートしています。

また、すべてのファイルには .md5 署名ファイルが付属しています。ダウンロードのチェックに使ってください (特に FTP を使う場合、RSYNC や Torrent を使えば、一般にファイルが切り詰められるなどのダウンロードの問題は避けられます)! 実際のデータをダウンロードする前に、まず .md5 ファイルの存在を確認する必要があります(ミラーが新しいダンプと同期しているために、過渡的な状態であることがあります)。また、ブラウザやダウンローダークライアントが 2 GB 以上の大きなファイルの転送をサポートしているか確認してください。ファイルを保存するためのローカル OS やファイルシステムについても同様に確認してください。

Mirror Available Planet data Network protocols
Preferred URL Loc Updated Diffs .osm.pbf .osm.bz2 HTTP HTTPS FTP RSYNC Torrent IPv6
planet.openstreetmap.org/ (original source, use another mirror below as much as possible)
GB
(Source) はい はい はい いいえ はい はい はい はい はい
ftp5.gwdg.de/pub/misc/openstreetmap/planet.openstreetmap.org/
DE
毎日 はい はい はい はい はい はい はい はい はい
free.nchc.org.tw/osm.planet/ (source: gwdg.de)
TW
毎日 はい はい はい はい はい はい はい はい はい
download.openstreetmap.fr/
FR
毎分 はい いいえ いいえ はい はい いいえ いいえ いいえ はい
planet.maps.mail.ru/
RU
毎分 はい はい はい はい はい いいえ はい はい いいえ
ftpmirror.your.org/pub/openstreetmap/
US
毎日 はい はい はい はい はい はい はい はい はい
ftp.fau.de/osm-planet/
DE
毎日 いいえ はい いいえ はい はい はい はい はい はい
mirror.init7.net/openstreetmap/
CH
毎日 いいえ はい はい はい はい いいえ はい はい はい
ftp.snt.utwente.nl/pub/misc/openstreetmap/
NL
毎週 いいえ はい はい はい はい はい はい いいえ はい
ftp.spline.de/pub/openstreetmap/
DE
毎週 いいえ はい はい はい はい はい はい はい いいえ
ftp.osuosl.org/pub/openstreetmap/
US
毎週 いいえ はい はい はい はい はい はい いいえ はい
download.bbbike.org/osm/planet/
DE
毎週 いいえ はい はい いいえ はい いいえ いいえ いいえ いいえ
downloads.opencagedata.com/planet/
DE
毎週 いいえ はい はい はい はい いいえ いいえ はい いいえ
ftp.nluug.nl/maps/planet.openstreetmap.org/
NL
毎週 いいえ はい はい はい はい はい いいえ いいえ はい
planet.passportcontrol.net/pbf/
JP
毎週 いいえ はい いいえ いいえ はい いいえ いいえ いいえ いいえ
archive.org/details/osmdata (Internet Archive, available under various items. Instructions on searching items is available in the "About" tab. Not part of official torrent swarm)
US
毎週 はい はい はい はい はい いいえ いいえ はい いいえ
osm.cquest.org/torrents/ Since 2021-04-21 does not act as (hidden) webseed anymore, and publishes regular torrents
FR
毎週
but in test and manual update.
いいえ はい いいえ はい はい いいえ いいえ いいえ いいえ
planet.osm-hr.org Last 15 days
HR
毎日 いいえ はい はい はい はい いいえ いいえ はい はい

国別・地区別の抽出

全世界の抽出による情報源

Mirror Area Updated Diffs HTTPS Metadata included
www.overpass-api.de Overpass API excerpts up to ~300MB uncompressed 毎分 はい, since v0.7.50 はい Optional
download.openstreetmap.fr/ Minutely diffs and daily extracts in PBF:
  • Entire continents
  • Many countries in all continents
  • Sub-country admin regions for several countries
毎分 はい はい
download.geofabrik.de Daily extracts in PBF stripped from personal metadata (user names, user IDs, changeset IDs):
  • Entire continents
  • Most countries
  • Sub-country admin regions for Brasil, Canada, France, Germany, Italy, Japan, Poland, Russia, UK, US

Note: Extracts are not suitable for editing.

毎日 はい はい Version and timestamp only
osm-internal.download.geofabrik.de Same as download.geofabrik.de but with full personal metadata:
  • Weekly full history extracts for all regions mentioned above (no diffs)

Note: Login with OSM account required. Files are subject to data protection regulation.

毎日 はい はい All fields
OSM Today.com ヨーロッパ、アジア、南米、北米、アフリカ、オーストラリアの 1000 を超えるサブリージョン。 毎日 いいえ はい Version and timestamp only
download.bbbike.org/osm/ Different extracts offered:
  • more than 200 cities and regions worldwide
  • extract your own individual area

Note: Extracts are not suitable for editing OSM, because they omit metadata such as version number. See the FAQ.

毎週 いいえ はい No metadata
protomaps.com/extracts Extracts up to ~100 million nodes in PBF
  • extract rectangular area or draw polygon
  • updated minutely
毎分 いいえ はい Version for all objects; Timestamp for ways, relations and tagged nodes

地域限定の抽出による情報源

Mirror Area Updated Diffs HTTPS Metadata included
osm.kewl.lu/luxembourg.osm/ Luxembourg (beta) 毎時 Yes but not Osmosis/Pyosmium compatible directory structure はい Partially
planet.osm.ch Swiss extract from the Swiss OpenStreetMap association. Including all lakes crossing the Swiss boundary and a few km of the surrounding countries. 毎時 はい はい All fields
osm.fit.vutbr.cz/extracts/czech_republic/ Czech Republic 毎日 いいえ はい version and timestamp only
data.osm-hr.org Croatia, Slovenia, Bosnia and Herzegovina, Montenegro, Macedonia, Serbia, and Kosovo, Albania, Bulgaria, Hungary, Romania
  • daily extracts in PBF
  • daily Garmin maps
  • daily Osmand maps
  • Croatia archive
  • Croatia diffs
  • planet thematic extracts
毎日 はい はい all fields
osmit-estratti.wmcloud.org Italy; daily extracts for Italian regions, provinces and municipalities; supported file formats: PBF, GeoPackage and OsmAnd OBF (Regions only). 毎日 いいえ はい Partially
osm.kcwu.csie.org/download/tw-extract/ Taiwan; only o5m format 毎日 Yes but not Osmosis/Pyosmium compatible directory structure はい all fields

全世界のテーマ別の抽出

  • OpenStreetMapData provides shapefiles of global coastlines, land polygons or water polygons.
  • osmdata.xyz provides monthly, global GeoPackages of each primary feature key.

オリジナルの情報源

オリジナル URL は https://planet.openstreetmap.org/ です。可能な限りミラーサイトBitTorrent を使ってください。

更新頻度

planet.osm の新しいバージョンは、毎週リリースされます(現在は毎週水曜日の朝です)。2006年4月開始時のバージョンまであります。

planet.com ファイルサイズは、 planet ダウンロードページのヘッダー情報で確認できます。 Planet ファイルは非常に巨大な(何十GBもあります)ので、ダウンロードを始める前にサイズを確認してください。

毎週のダンプは通常イギリス時間で月曜の 01:10 頃に始まり、その時点までの全ての更新を含むことが保証されています。ダンプは変換ソフトウェアを使ってデータベースダンプから構築され、その結果、参照整合性が確保されるはずです。ただし、これは抽出物には必ずしも適用されないことに注意してください。ダンプと変換は通常、合計で48時間程度かかり、結果は通常、水曜日の朝に準備されます。

注: ファイルのタイムスタンプは <osm version="0.6" generator="OpenStreetMap planet.c" (...) timestamp="2013-01-02T01:10:14Z"> のように記録されるので、どの「差分」を利用するかを決めるのに役立つでしょう。

加えて、定時差分 (regular diff) を提供しています。 これらは、毎日生成され('daily' サブディレクトリにあります)、最近では毎時、毎分の差分も提供しています。 これらは、 Osmosis によって生成されており、全データセットを再構成するのに使うことができます(OSM ウィキページの Osmosisosmupdate の例を参照してください)。これらは差分しか含んでいないので、ずっと小さいファイルになります。日次差分はふつう、圧縮で 40MB 程度です。詳しくは、 Planet.osm/diffs を参照してください。

技術的なメモ

Small region OSM DB-only copy

Q: I would like to set up a copy of OSM DB only for a small region and then keep it up to date with the replicates

You will need to apply the full diffs and afterwards cut off anything you're not interested in.

If you intend to do it for a rather small area then it is really quite easy and performs well with Osmosis. Assuming you have a current extract of your area in "current.osm" and you have the Osmosis replication set up properly (--rrii), then you simply run

 osmosis --rri --simc --rx current.osm --ac --bb left=42 right=42 top=42 bottom=42 
 clipIncompleteEntities=yes --wx new.osm && mv new.osm current.osm

as often as you like (adapt the 42's in the bounding box).

ファイルの処理

See Databases and data access APIs#Database Schemas for loading a planet file into a database.

See OSM file formats#Map-data for a list of tools which are able to manipulate osm files.

See Frameworks for accessing osm files from your software.

Unpacking .bz2 files

Osmosis と osm2pgsql ではファイルを bz2 圧縮形式で扱うことができます。もし bz2 形式を展開する必要がある場合は、 Windows では、7-zip を使用してください。 Linux では bzip2 -d planet.osm.bz2 打つだけです。 OS によってはダブルクリックでの展開に対応していることもあります。ウィキペディアの圧縮プログラムの一覧を参照してください。

libbzip2 を利用して、自分で圧縮を扱いたい場合は、 pbzip2 で圧縮されて複数ストリームを含むファイルは bzip2 ドキュメントの section 3.4.8 に記述されているように扱う必要があります。

During download, the network will be your bottleneck. Once you have the file you will need to unpack it, and then disk I/O will be your bottleneck. Or you can work with the bzip'ed file, but then the CPU will be your bottleneck. If you have sufficient space to unpack the full planet file, you can save a lot of time and disk thrashing by unpacking it on the fly while downloading it: try curl https://planet.openstreetmap.org/planet_latest.osm.bz2 | pbzip2 -cd >planet_latest.osm.

In most cases, using import tools supporting the PBF format will be a faster and more efficient solution. They can be processed directly without unpacking to plain OSM XML format and PBF-compressed OSM files are always smaller than bzip2-compressed OSM files and faster to download.

その他の技術メモ

wget: curlの代わりに wget -O - を使用することができます。planetファイルのサイズが大きいため、古いディストリビューションのwgetは2 GB 以上のファイルサイズをサポートしていないため、動作しないことがあります。それ以上のファイルをダウンロードしようとすると、マイナスのファイルサイズが報告され、失敗します。

pbzip2: may be replaced by the single-threaded bzip2 -cd / bzcat as well.

Refences

Missing nodes

Note that planet download have ways that reference nodes that are not in the same file.

Due to performance reasons it isn't possible oto get a fully consistent snapshot of the database. Although the dump is run in a transaction, the isolation level required for a "snapshot"-style dump dramatically increases the running time. You might find that, if you have been editing while the export has been running, that the way may be in there but the nodes are not. You can take a planet file and apply the daily diffs using Osmosis to create a consistent planet file (however you may still have some problems with old bad data in OpenStreetMap from before the introduction of the API 0.6).

country extracts

Country extract may have ways that reference nodes that are not in the same file.

This is perfectly normal depending on the settings used in the extraction process. There are two options; either the ways at the boundary have been truncated (such as in the GeoFabrik downloads), or the nodes are just left out and the ways are left as is (for example the CloudMade downloads).

Handling missing references

This really depends on what you are doing with the data. You can either drop the node references or you can go to another data source, such as the API, to fetch the missing nodes.

Other planet files

ライセンス

Planet ファイルは展開元である OpenStreetMap ジオデータベースのマスターと同じライセンスでライセンスされます。現在は Open Database License です。2012年9月12日以前の Planet ファイルは Creative Commons Attribution-ShareAlike 2.0 ライセンスです。