Maps/Linking wikipedia to OSM
- 1 Linking between wikipedia and OSM
- 3 Approach 2: A separate map-based application that links both: extending overpass
- 4 Also of interest
1 Linking between wikipedia and OSM
There are few services that help to link Wikipedia to OSM:
- http://www.geodati.fmach.it/gfoss_geodata/osm/wtosm/it_IT/ (Italy only)
- http://osm.wikidata.link/ (works on page title)
2.1 Approach 1: Tampermonkey: From wikipedia to OSM (and back)
Here's a tampermonkey script that inserts a link into a wikipedia page (near the "coordinates" section at the top right). The link is set in the script, and could be
- a link OSM/iD ("edit this area")
- a link to JOSM remote control
- a link to http://osm.wikidata.link/
- or to a local server (similar to JOSM remote control, see below). By running such a local server, you can then intercept the data extracted from the wikipedia page, process it and then link to OSM/JOSM
Note that because tampermonkey is essentially scraping, it's not guaranteed to work on all wikipedias, and it's not guaranteed to work in the future.
2.1.2 Approach 1b: Instead of tampermonkey use MW gadget
Version rolled into a mediawiki gadget https://www.mediawiki.org/wiki/User:Bjohas/OSMgadget.
184.108.40.206 Image gallery
I basically wanted to fix some stuff in both OSM and Wikipedia, creating links between the two, and fixing issues. So I needed a tool that could display both, and I couldn't find out. The most promising solution for location-based matching between wikipedia and OSM is probably leafletjs, which has plugins for both overpass and wikipedia (http://leafletjs.com/plugins.html). So I looked at leaflet, and the various plugins, and started to build the first version like this.
However, rather than starting with basic leaflet, why not build on overpass-turbo (build on leaflet). At least overpass-turbo already handles the overpass api queries! So I added the wikipedia plugin to overpass (rather than starting from scratch with leaflet). See Overpass Turbo with Mediawiki API for details.
Also see Archaeology/Linking OSM and Wikipedia for some overpass code.