Help:Extension:Kartographer/OSM/ja

OpenStreetMap のオブジェクトを使用する方法
You can draw polygon and way objects (regions and lines), such as countries, roads, or parks from OpenStreetMap directly on maps. これを行うには、OSM オブジェクトにウィキデータ ID をタグ付けする必要があります. ウィキペディアの地図は地点 (ノード) にまだ対応していません.

 { "type": "ExternalData", "service": "geoshape", "ids": "Q995174", "properties": { "title": "Bryant Park", "description": "", "stroke": "#125123", "stroke-width": 3, "fill": "#2aaf4d" } }

例えば、ニューヨークのブライアント パークを強調するには、それのウィキデータ ID 番号を見つける必要があります. 最も簡単な方法は、対応するウィキ記事 ブライアント パーク を開き、左のツールボックス内の「」を開くことです. In some rare cases, there may not be a corresponding Wikidata item, in which case you should create it and add the Wikipedia article to it.

Once added (see "how to" below if it's missing), you will be able to use the "geoline" service for lines, "geoshape" service for polygons, and "geomask" service to mask-out everything except the needed polygon.

ウィキデータ ID を OSM に追加する方法

 * osm.org を開きます.
 * アカウントをお持ちではない場合は、(右上隅の)「ログイン」をクリックし、ウィキペディア アイコンをクリックします - これによりあなたのウィキペディア アカウントで OSM を使用できるようになります.
 * 検索ボックスを使用し、左のペインで必要なオブジェクトを見つけてクリックします.
 * お探しのオブジェクトが鮮やかなオレンジの線で表示されたら、「wikipedia」・「wikidata」タグを確認します. 両方ある場合は、これで完了です.
 * Zoom in onto any part of the orange line all the way to the ground.
 * 上部の「編集」ボタンをクリックします. 地図上のいかなる場所もクリックしないようにご注意ください.
 * The left side of the screen should now show "Edit feature" box. Scroll down to "Add field:" box, which is right above the "All tags (..)".
 * If there was no wikipedia and no wikidata tags, click "add field" box and select Wikipedia. 言語を選択して記事名をコピー&ペーストします. これによりウィキデータ タグも自動的に追加されます (「すべてのタグ」節で確認できます).
 * If there was a wikipedia tag, but no wikidata, you can either delete and re-add the wikipedia box, and simply add the "wikidata" tag by hand in the "all tags" section.
 * 保存をクリックし、変更内容の適切な説明を入力します.
 * データは約１日で利用できるようになるはずです (この時間を短縮できるよう作業を進めています)

複数の線分から単一のオブジェクトを取得する方法
Often, a group of lines correspond to a single item – such as a road that is made up of multiple ways. Each "wikidata" tag should have a unique value, so therefore the individual lines need to be grouped into a single object. The following instructions assume you want to create (or find) a single object for a road, but should work (with minor variations) for other types of lines.

用語

 * ノード:
 * ノードは地図上の単一の地点です


 * ウェイ:
 * ウェイは2個以上のノードを接続する線分です


 * リレーション:
 * リレーションはウェイ群のグループであり、経路を構成します

過程の概要

 * OSM で、道路全体を網羅するリレーションを見つけるかまたは作成します
 * タグを使用してウィキデータ項目 ID (Q 番号) を追加します (まだない場合)
 * データベースが処理されるまで1～2日待ちます

過程の詳細

 * 1) osm.org を開きます.
 * 2) Move the map so you can see the road you want, and enter the road name into search box
 * 3) Results (ways) will come up in a pane of the left of the screen. Find a way which is part of the road you want, and click it. The pane will then load details for the selected way, and it will be highlighted on the map.
 * 4) Scroll down the pane to the bottom, and look at the section "Part of". If there are any relations listed there, click on them to check if they cover the whole road. If you find one you want, good; otherwise you will need to create one (see 'Create a new relation' below)
 * 5) Click "edit" button at the top. Be careful not to click anything in the map. The left side of the screen should now show "Edit feature" box. Scroll down to "Add field:" box, which is right above the "All tags (..)".
 * 6) *If there was no wikipedia and no wikidata tags, click "add field" box and select Wikipedia. Select the language and copy/paste the article name. This will automatically add the Wikidata tag as well (you can check them in the "all tags" section).
 * 7) *If there was a wikipedia tag, but no wikidata, you can either delete and re-add the wikipedia box, and simply add the "wikidata" tag by hand in the "all tags" section.
 * 8) Click Save, and enter a good change description. The data should be available to Wikipedia in about 1 day.
 * 9) Add the relation id to the Wikidata item using

リレーションの新規作成
If there is no exisitng relation for the road you want, you'll have to create a new one. There are multiple ways do this: Potlatch 2 editor is good for shorter roads, JOSM editor is better for longer roads.

Potlatch の使用

 * 1) Zoom in to the area around the road, then click the dropdown arrow next to "Edit", select "Edit with Potlatch 2"
 * 2) Once Potlatch has loaded data onto the screen, use CTRL+click to select the first way (road segment). It will show up highlighted on the map. Continue to CTRL+click additional ways until the whole road is highlighted.
 * 3) In the pane on the left, there is a table down the bottom listing any existing relations for the ways that have been selected. Below this table, click on "Add to". A window titled "Select relation" will pop-up, down the bottom of this window click the "New relation..." button.
 * 4) At the bottom of the window, click advanced. A blank table of Keys and Values is shown – add the following keys/values to the table (click "Add" just under the table)
 * : name of the road
 * : Q-number (the wikidata ID)
 * 1) Close the "Edit relation" pop-up window, and save the edit. You can go back to https://www.openstreetmap.org and repeat Step 1 to verify the new relation you just created.
 * : Q-number (the wikidata ID)
 * 1) Close the "Edit relation" pop-up window, and save the edit. You can go back to https://www.openstreetmap.org and repeat Step 1 to verify the new relation you just created.

JOSM の使用

 * 1) Make sure your account has an OSM password associated with it: login with Wikipedia account, then go to your profile (click your name box in the top-right corner of screen), go to Settings, fill in Password and Confirm password fields, scroll down and click Save changes.
 * 2) Download or launch JOSM from https://josm.openstreetmap.de/
 * Now, in JOSM, you need to download the ways that make up the road you want. There are two ways to do this (and you can also use a combination of both methods):
 * 1) *Download existing relations which overlap with the road you want (e.g. Relation: 94 (317411) overlaps with most of Great Eastern Highway. Use the method described in 'Process details' above to find any overlapping ways, and note their object id (the number in brackets, also in the url following  once clicked on)
 * Go to File -> Download object... -> enter object id (or ids), click Download objects
 * 1) *Download areas containing the road. Be aware that the bounding boxes can't be too large, or the OSM server will not allow the download.
 * Go to File -> Download from OSM... -> select area with mouse, click Download. Repeat if necessary.
 * 1) Once downloaded, you should see lines representing all the ways along the route (as well as other data if you downloaded areas). Now you need to select all the ways that make up the road. There are two ways to do this:
 * 2) *Search for items to add to or remove from the selection
 * Go to Edit -> Search... -> Enter the name of the road in the search box. This can be repeated as many times as necessary, if multiple names are used along the route, or non-road items are selected (e.g. buildings along the road) – for the first search select "Replace selection", for subsequent searches, select "Add to selection" or "Remove from selection". Click Start search.
 * SHIFT+click on items to add them to the selection, or CTRL+click on items to remove them from the selection. Multiple items can be added or removed by holding down the click, and drawing a box that completely contains the items.
 * 1) The selected items will be highlighted on the screen, and will be listed in a box on the right. Look through this list for items to remove with another search. Also look at the route on the main part of the screen for any missed ways to add with another search.
 * 2) Once you're happy with the selection, go to Presets -> Relations -> Routes -> Road route. Enter the road name in the name field, click New relation. A more detailed window will pop up. In the Key/Value table, click into the blank space in the Key column, type "wikidata" (lowercase). In the Value field to the right, type the Wikidata ID (Q-number) for the road. OK ボタンをクリックします.
 * 3) Now upload the data to OSM:
 * 4) *Go to File -> Upload data. A warning box may pop up - per the instructions there, "When in doubt ignore them" (or if you know what you are doing, you can fix them); click Continue upload
 * 5) *In the next window, check that you're not accidentally deleting things, changing things, or adding anything other than the new relation you just made. Enter a meaning comment for the changes, for the data source you can specify "OSM data", then click Upload changes.
 * 6) *Login with your username and OSM password when requested.
 * 7) Verify that the new relation has been uploaded (follow the steps in 'Process details' above and the new relation should come up). Minor changes can be made using Potlatch if required.