JA:データのダウンロード

From OpenStreetMap Wiki
(Redirected from JA:Downloading data)
Jump to: navigation, search
利用できる言語 — Downloading data
· Afrikaans · Alemannisch · aragonés · asturianu · azərbaycanca · Bahasa Indonesia · Bahasa Melayu · Bân-lâm-gú · Basa Jawa · Basa Sunda · Baso Minangkabau · bosanski · brezhoneg · català · čeština · corsu · dansk · Deutsch · eesti · English · español · Esperanto · estremeñu · euskara · français · Frysk · Gaeilge · Gàidhlig · galego · Hausa · hrvatski · Igbo · interlingua · Interlingue · isiXhosa · isiZulu · íslenska · italiano · Kiswahili · Kreyòl ayisyen · kréyòl gwadloupéyen · Kurdî · latviešu · Lëtzebuergesch · lietuvių · magyar · Malagasy · Malti · Nederlands · Nedersaksies · norsk bokmål · norsk nynorsk · occitan · Oromoo · oʻzbekcha/ўзбекча · Plattdüütsch · polski · português · română · shqip · slovenčina · slovenščina · Soomaaliga · suomi · svenska · Tagalog · Tiếng Việt · Türkçe · Vahcuengh · vèneto · Wolof · Yorùbá · Zazaki · српски / srpski · беларуская · български · қазақша · македонски · монгол · русский · тоҷикӣ · українська · Ελληνικά · Հայերեն · ქართული · नेपाली · मराठी · हिन्दी · भोजपुरी · অসমীয়া · বাংলা · ਪੰਜਾਬੀ · ગુજરાતી · ଓଡ଼ିଆ · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · සිංහල · བོད་ཡིག · ไทย · မြန်မာဘာသာ · ລາວ · ភាសាខ្មែរ · ⵜⴰⵎⴰⵣⵉⵖⵜ ⵜⴰⵏⴰⵡⴰⵢⵜ‎ · አማርኛ · 한국어 · 日本語 · 中文(简体)‎ · 中文(繁體)‎ · 吴语 · 粵語 · ייִדיש · עברית · اردو · العربية · پښتو · سنڌي · فارسی · ދިވެހިބަސް
その他の言語このウィキの翻訳を支援してください

OpenStreetMap のデータセットからは、いくつかの方法でデータのダウンロードをすることが可能です。データセット全体は OpenStreetMap のダウンロードエリアにあります。小分けした領域を選択してダウンロードすることが可能です。データはふつう、 XML フォーマットの .osm ファイルです。もし(GPS 機器などで)「地図」を使いたいだけであれば、生のデータをダウンロードする必要はありません。代わりにその他の OSM ダウンロードオプションを参照してください。

考えておいていただきたいことがあります。

  • Planet 全体は巨大なデータ量です。セットアップが正しく動作するように確認するには、地域で区切ってください。 Osmosisデータベースインポートのための様々なインポート・変換ツールのような一般的なツールでは、ディスクの速度にも大きく影響されますが、データのインポートに数時間または数日間かかります。
  • OpenStreetMap はプロジェクトの連合です。つまり、第三者からたくさんの基本的なリソースが提供されています。思い切って、まずそちらをダウンロードしてみてください。公式のサーバーは大きなデータではなく、大量の資源を必要としません。同期のデータを流れを維持するにはより向いています。

All data at once

Planet.osm contains the entire planet. This is a snapshot of the current data, usually from last Wednesday. This is almost 40 GB compressed.

The planet history contains even the history of almost all objects and is even bigger.

Huge amounts of data

Several extracts allow to download more manageable file sizes, from an entire continent to parts of a country. Tools like Osmosis, osmconvert, and osmfilter will assist you to extract specific data from these extracts.

XAPI and Overpass API allow to download custom data sets like arbitrary bounding boxes, elements with specific tags, public transport networks or other features.

Small amounts of data

Using the export tab, one can select a piece of the map and download the data in several formats, including OSM XML. This intentionally works only at low zoom levels.

A basic operation of the OpenStreetMap API, is the 'map' request. For the relevant API documentation see: API v0.6#Retrieving map data by bounding box: GET /api/0.6/map. Furthermore, the main api allows you to download the XML of single elements and the history of each of these elements. It is dedicated to editing, not downloads. Don't use this for mass requests, because this is resource intensive. Please use Overpass API or XAPI instead.

JOSM provides a useful interface for selecting the area you wish to download, and instant visualization of all the data you have downloaded. You can edit the data to re-upload it later. You can also save the data to .osm file (JOSM file format) for further processing. But because it employs the main API, it is not intended for downloading large quantities of data.

Note that use of the API (and especially bbox map data requests) is subject to our API usage policy. Heavy use (or large numbers of requests from many users) should use one of the above mentioned services instead.

Choose your region

The region is specified by a bounding box, which consists of a minimum and maximum latitude and longitude. Choose as small a region as will be useful to you, since larger regions will result in larger data files, longer download times, and heavier load on the server. The server may reject your region if it is larger than 1/4 degree in either dimension. When you're first starting out, choose a very small region so that you can figure things out quickly with small data sets.

There are several ways of finding latitude and longitude values. Since we are interested in a bounding box, perhaps the clearest way is to use the bounding box selection features of the 'export data' link. On the homepage map pan and zoom to roughly the right area, and then click the 'export data' (link on the left). This sidebar display includes the four values you need for a bounding box matching the extents of the viewport. Click 'Manually select a different area' and then drag a box to select exactly the region you want.

Construct a URL for the HTTP API

You must now construct an API request URL as specified in the map request docs. In the URL, a bounding box is expressed as four comma-separated numbers, in this order: left, bottom, right, top (min long, min lat, max long, max lat). Latitude and longitude are expressed in decimal degrees. North latitude is positive, south latitude is negative. West longitude is negative, east longitude is positive. The method described in the previous section will give you suitable values.

Example:

http://api.openstreetmap.org/api/0.6/map?bbox=11.54,48.14,11.543,48.145

The API is limited to bounding boxes of about 0.5 degree by 0.5 degree and you should avoid using it if possible. For larger areas you might try to use XAPI, for example:

http://overpass.osm.rambler.ru/cgi/xapi_meta?*[bbox=11.5,48.1,11.6,48.2]

Refer to the XAPI page for details of other servers available.

Download the data

You can just type this URL into a browser if you want, but that may not work as well as you'd hope, especially if the data is large. If you know how to use them, command-line tools like wget and curl will do a better job.

If you've specified a region with a lot of data, you may have to wait a while before the HTTP response begins (the server is crunching your request). If your client times out, try setting options for a longer timeout, or choose a smaller region.

Here's an example command line for wget:

wget -O muenchen.osm "http://api.openstreetmap.org/api/0.6/map?bbox=11.54,48.14,11.543,48.145"

See also