<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3AOSM%2Fdoc</id>
	<title>Module:OSM/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3AOSM%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:OSM/doc&amp;action=history"/>
	<updated>2026-05-24T12:48:52Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:OSM/doc&amp;diff=144159&amp;oldid=prev</id>
		<title>imported&gt;Jc86035: HTTPS for OpenStreetMap wiki (via WP:JWB)</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:OSM/doc&amp;diff=144159&amp;oldid=prev"/>
		<updated>2018-12-06T11:27:21Z</updated>

		<summary type="html">&lt;p&gt;HTTPS for OpenStreetMap wiki (via &lt;a href=&quot;/index.php?title=WP:JWB&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:JWB (page does not exist)&quot;&gt;WP:JWB&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Module rating |beta}}&lt;br /&gt;
&lt;br /&gt;
== Goal ==&lt;br /&gt;
&lt;br /&gt;
On this page [[Wikipedia:WikiProject_OpenStreetMap]] it becomes clear different approaches have been tried before to link from Wikipedia to Openstreetmap.&lt;br /&gt;
&lt;br /&gt;
But why is this so hard? Well, there are a few problems, one of them is that ids for nodes, ways and relations on Openstreetmap are not guaranteed to be stable. When ways are split the id will point to a shorter stretch and the other part will get a new id. Sometimes points of interest which start as nodes, are converted to (closed) ways. Some contributors delete items, which get recreated by them a bit further along. Or somebody notices it&amp;#039;s missing and recreates it fresh.&lt;br /&gt;
&lt;br /&gt;
So pointing directly to the OSM objects themselves doesn&amp;#039;t work all that well. Let&amp;#039;s say it&amp;#039;s not future proof. It may work at the moment you define the link and a good while after, or it may fail the next day already.&lt;br /&gt;
&lt;br /&gt;
===Wikidata===&lt;br /&gt;
Luckily Wikidata came along and this forms a part of the puzzle that can help solve this problem. What we can do is add tags which refer back to Wikidata items on the Openstreetmap side.&lt;br /&gt;
&lt;br /&gt;
[https://wiki.openstreetmap.org/wiki/Proposed_features/Wikidata wikidata tag]&lt;br /&gt;
&lt;br /&gt;
Now if a way is split, both parts will continue with the proper wikidata tag.&lt;br /&gt;
&lt;br /&gt;
===Overpass API===&lt;br /&gt;
But now we have a new problem. How to find those elements in the Openstreetmap DB, which got wikidata tags assigned to them?&lt;br /&gt;
&lt;br /&gt;
Well there is a tool to help with this. It has the whole database of Openstreetmap, updated on a minutely basis and it&amp;#039;s fast to query, on condition the queries can be kept simple. It&amp;#039;s called [https://wiki.openstreetmap.org/wiki/Overpass_API Overpass API].&lt;br /&gt;
&lt;br /&gt;
===Overpass Turbo===&lt;br /&gt;
Looking at raw data, is not very instructive either, so another tool was built around it, which is called [https://wiki.openstreetmap.org/wiki/Overpass_turbo Overpass Turbo].&lt;br /&gt;
&lt;br /&gt;
===Query===&lt;br /&gt;
Developing these queries takes some trial and error. What this module does for you, is to automate the process and come up with a query that works, with sensible default values.&lt;br /&gt;
&lt;br /&gt;
For example if you omit the Wikidata id, the id of the corresponding article will be used.&lt;br /&gt;
&lt;br /&gt;
But it&amp;#039;s also possible to write your own custom queries, or to specify further filters. Normally all objects&amp;#039; types, nodes, ways and relations will be fetched, but it&amp;#039;s possible to limit to only ways, for example.&lt;br /&gt;
&lt;br /&gt;
===in style===&lt;br /&gt;
Adding a style sheet allows you to present the data in a more suitable way. An attempt is being made to add a style sheet that makes sense, but it&amp;#039;s possible to define your own.&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
* Search Openstreetmap independently of wikidata tags&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;#invoke:{{BASEPAGENAME}}|&amp;#039;&amp;#039;overpass&amp;#039;&amp;#039;}}&lt;br /&gt;
* Search Openstreetmap for items which have wikidata=Q....&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;#invoke:{{BASEPAGENAME}}|&amp;#039;&amp;#039;wd&amp;#039;&amp;#039;}}&lt;br /&gt;
* Search Openstreetmap for items which have name:etymology:wikidata=Q....&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;#invoke:{{BASEPAGENAME}}|&amp;#039;&amp;#039;etym&amp;#039;&amp;#039;}}&lt;br /&gt;
* Search Openstreetmap for items which have subject:wikidata=Q....&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;#invoke:{{BASEPAGENAME}}|&amp;#039;&amp;#039;subject&amp;#039;&amp;#039;}}&lt;br /&gt;
* Search Openstreetmap for items which have artist:wikidata=Q....&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;#invoke:{{BASEPAGENAME}}|&amp;#039;&amp;#039;artist&amp;#039;&amp;#039;}}&lt;br /&gt;
* Search Openstreetmap for items which have architect:wikidata=Q....&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;#invoke:{{BASEPAGENAME}}|&amp;#039;&amp;#039;architect&amp;#039;&amp;#039;}}&lt;br /&gt;
* Search Openstreetmap for items which have operator:wikidata=Q....&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;#invoke:{{BASEPAGENAME}}|&amp;#039;&amp;#039;operator&amp;#039;&amp;#039;}}&lt;br /&gt;
* Search Openstreetmap for items which have brand:wikidata=Q....&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;#invoke:{{BASEPAGENAME}}|&amp;#039;&amp;#039;brand&amp;#039;&amp;#039;}}&lt;br /&gt;
* Search Openstreetmap for public transport lines related to the current article&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;#invoke:{{BASEPAGENAME}}|&amp;#039;&amp;#039;pt&amp;#039;&amp;#039;}}&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
&lt;br /&gt;
* display    : Text shown on outgoing link&lt;br /&gt;
* link       : defaults to yes, but can be set to no for use in other templates&lt;br /&gt;
* timeout    : defaults to 15 seconds, needs to be set higher for more complicated queries&lt;br /&gt;
* id         : can link to a 1 or more Q-numbers of wikidata items, defaults to the Q-number id of the calling page&lt;br /&gt;
* query      : makes it possible to extend the query, which can be used to limit the search to highways or tombstones&lt;br /&gt;
* prim       : only fetch &amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039;ode, &amp;#039;&amp;#039;&amp;#039;w&amp;#039;&amp;#039;&amp;#039;ay and/or &amp;#039;&amp;#039;&amp;#039;r&amp;#039;&amp;#039;&amp;#039;elation primitives&lt;br /&gt;
* coord      : coordinates and a zoom factor in this format: &amp;#039;&amp;#039;&amp;#039;47.0618984;15.4370248;17&amp;#039;&amp;#039;&amp;#039; from which a bbox will be determined.&lt;br /&gt;
* limitToBBOX: defaults to yes. If coord is set the query is limited to the resulting bbox&lt;br /&gt;
* run        : defaults to yes. Use no if you want the user to be able to move the map or change the query before searching&lt;br /&gt;
* style      : it&amp;#039;s possible to define a MapCSS style to present the result in a nicer way&lt;br /&gt;
&lt;br /&gt;
== Test values  ==&lt;br /&gt;
&lt;br /&gt;
{{#invoke:OSM/testcases|run_tests}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox | |&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;Jc86035</name></author>
	</entry>
</feed>