Wikipedia:Creating shape maps from OpenStreetMap data: Difference between revisions
Content deleted Content added
(5 intermediate revisions by 2 users not shown) | |||
Line 2:
This is a tutorial for creating interactive maps on Wikipedia for shapes using [[OpenStreetMap]] data, available on a compatible [[Open Database License]]. This is applicable for creating maps of neighborhoods, parks, historic districts, campuses, and most other present-day sites. For maps of lines (transit routes, roads, etc.), see [[Wikipedia:Creating route maps from OpenStreetMap data]].
This tutorial requires basic knowledge of:
* finding Wikidata IDs
There are two methods you can use to find the space you want to map:▼
* using {{tl|Maplink}} and its parameters (some helpful substitutes may be {{tl|Infobox mapframe}} and {{tl|Maplink-road}})
If you need help please use the talk page, [[User talk:Ɱ]], or [[Module talk:Mapframe]].
=== Method 1: Wikidata ===
The first thing to try is the easiest. There's a possibility your data is already linked and you're ready to map. Create a test map in [[Special:MyPage/sandbox|your sandbox]]. You'll need to use {{tl|Maplink}} together with the Wikidata ID of the shape. As an example: <kbd><nowiki>{{maplink|frame=yes|type=shape|id=Q160236}}</nowiki></kbd> If it displays, great. You can use the map and add parameters to make it display to your liking. If the map data does not populate, the below methods are straight-forward and reliable:
=== Method 2: Using the OpenStreetMap website ===
[[File:Park OSM map.jpg|thumb|upright=1.8|After right-clicking the shape you want to map (for instance, Scioto Audubon Metro Park), click 'Query features' to bring up the lefthand toolbar. Select the feature name to bring up its relation.]]
#Go to [https://www.openstreetmap.org/ OpenStreetMap] and zoom into the general area where the shape is.
Line 11 ⟶ 19:
#Then search through the list for the shape you desire; selecting it will bring you the relation representing the shape, with the shape displayed beside it on the map.
=== Method
If you already know how the relation would be tagged, the OSM Relation Analyzer can be more convenient. '''Note:''' this can only be used for shapes that are relations, not ways.
#Go to the [http://ra.osmsurround.org/ OSM Relation Analyzer].
Line 20 ⟶ 28:
== Part 2: If you need to create the shape ==
This optional step is only for shapes that are not already mapped on OpenStreetMap. Note that the entity you want to map must be an existing place in order to be accepted on OpenStreetMap, as OSM is not intended to map out historical, fictional, or unrecognized entities.
# Sign up or log-in to OpenStreetMap.
Line 41 ⟶ 49:
If the shape has a Wikidata item and the OpenStreetMap shape relation already has a <code>wikidata</code> tag set to that item's QID, you can embed a map of the shape directly onto a Wikipedia article as [[mw:Help:Extension:Kartographer#External data|external data]]. Use the {{tl|maplink}} template, setting the {{para|id}} parameter to the QID, such as <kbd>Q88466277</kbd>. Normally, changes to the route in OpenStreetMap are reflected in the article within about two days.
Example: <code><nowiki>{{maplink|frame=yes|
=== Method 2: Using Wikimedia Commons ===
|