Geohack easy copy/paste (Greasemonkey script)
A recent project required research into the locations of communities and institutions, using Wikipedia (among other sources). Many pages on the open encyclopedia include coordinate information, which links to the GeoHack extension. An example is this GeoHack page for Stockholm.
To make it easy to copy the decimal coordinates into a spreadsheet or database (in our case, it was Microsoft Access), the following script was constructed. The goal was to add a button, with access key defined, to open a box from which the user could copy the information to the clipboard. The decimal coordinates are separated by a tab character, to facilitate pasting into a database/spreadsheet.
See below for the full code for the Geohack easy copy/paste script. It should apply to all pages found under http://toolserver.org/~geohack/
The code is available for unrestricted download under a Creative Commons Attribution 3.0 Unported License. This gives you the right to redistribute and modify the script, as long as Nordpil is properly credited.
Releases and versions
- version 1.0, February 9, 2012