Club

Go to The Main Page Add Club to favorite!

Wikipedia:WikiProject Geographical coordinates 

World Wind displaying WP coordinates (see applications below)
World Wind displaying WP coordinates (see applications below)
Shortcuts:
WP:GEO
WP:GEO COOR

Any Wikipedian may participate in this project to better organize information in articles containing geographical coordinates. This page and its subpages contain suggestions; it is hoped that this project will help to focus the efforts of other Wikipedians. If you would like to help, please include yourself as participant, inquire on the talk page and see the to-do list there.

NOTE: This is a concept currently under development, so this is subject to change.

Contents

Title

WikiProject on Geographical coordinates

Quick 'how to'

Quick "how to"
To add the coordinates 57°18′N 4°27′W to the top of an article, use
{{coord|57|18|N|4|27|W|display=title}}

Degrees, minutes (and seconds) are separated by a pipe ("|").
Latitude (N/S) before longitude (E/W)

For decimal coordinates, such as 44.1°N 86.9°W, use
{{coord|44.1|N|87.9|W|display=title}}
or
{{coord|44.1|-87.9|display=title}}
For full details on the use of {{coord}}, see Template:Coord
See also: Obtaining coordinates, coordinate conversion

Scope

This WikiProject aims primarily to establish a standard for uniform handling of latitude and longitude coordinates as given in various Wikipedia articles, somewhat analogous to how ISBN numbers are handled.

Related WikiProjects

Parent: WikiProject Maps.

Descendant: Wikipedia-World

Similar WikiProjects

Other WikiProjects that make use of geographical coordinates include:

Participants

Userbox: {{User WikiProject Geographical_coordinates}}

Goals

  1. Should provide a uniform markup for all geographic coordinates
  2. Should provide a user-preferred appearance for all geographic coordinates
  3. Markup should be easy and natural to use
  4. ☑.svg Should be able to have a uniform, extensible way of accessing all types of map resources, avoiding having direct external links to maps in articles
  5. ☑.svg Clicking on a reference navigates directly to a page with external pointers to various resources, with coordinates automatically embedded where possible. The resources can be maps of various kinds, topological charts, satellite photos and others.
  6. ☑.svg Create a database of points, enabling generation of navigatable maps with a clickable icon appearing for every location for which there is a Wikipedia article. This has been implemented for NASA World Wind, Google Earth (see below) and Google maps (see below).
  7. ☑.svg Serve as a tool for finding Wikipedia articles describing nearby locations. See also meta:Wikipediatlas.
  8. Adhere to existing Internet standards for geographic coordinates as far as possible

Markup

The practical usage of coordinate markup in Wikipedia is described in the style guide for geographical coordinates. For use on maps and other services, parameters may also be required.

A complete entry could for example be: {{coord|51|28|40|N|0|0|6|W|type:landmark_scale:2000_region:GB}}

See also: Obtaining coordinates

Marking project-related pages on Talk page

The template {{WPcoord}} may be added to relevant Talk pages. This adds the page to several categories and displays as:

WikiProject Geographical coordinates is of interest to WikiProject Geographical coordinates, which encourages the use of geographical coordinates in Wikipedia. If you would like to participate, please visit the project page, where you can join the project and see a list of open tasks.

Implementation details

Geo tag

To define a geographical point, the Mediawiki gis extension is required. For further information, see the Mediawiki documentation.

NOTE: This extension is available, but is currently not enabled for Wikipedia. The functionality is thus currently only available via the {{coord}} template:
{{coord|48|46|36|N|121|48|51|W|}} gives 48°46′36″N 121°48′51″W / 48.77667, -121.81417 (output depends on user preferences)
On the surface of the Earth, 1 minute of arc of latitude corresponds to approx. 1.0 nautical mile or 1.852 kilometer, whereas, 1 arc second of latitude corresponds to approx. 30.87 meters (101.28 ft). Because of the approximate numerical equivalence of minute of arc and nautical mile measures, many people find minutes, in degree-minute (dm) format easier to comprehend than arc seconds in degree-minute-second (dms) format, e.g., for navigation.

The geo tag specifies the coordinates as degrees/minutes/seconds of latitude and longitude, like this:

<geo>48 46 36 N 121 48 51 W</geo>.

In the article, the tag will appear, linked, as 48°46′36″N 121°48′51″W. Seconds, or minutes and seconds, may be omitted. Optionally, the precision of the smallest unit used may be increased using decimals.

Parameters

Following the geographical coordinate, further parameters can optionally be supplied, separated by underscores. This will help in finding suitable map resources, and will become more important when the Wikimaps become fully functional.

type:T

Sets the type of this location, which will be used for the reverse mapping of the points. Type will also set default map scale. If the default map scale is not appropriate, consider adding a scale:N parameter. Types are:

Type Description Scale
country (e.g. "type:country") 1:10,000,000
satellite geo-stationary satellites (1:10,000,000)
adm1st Administrative unit of country, 1st level (province, state), see table, e.g. U.S. states 1:1,000,000
adm2nd Administrative unit of country, 2nd level, see table, e.g. County (United States) 1:300,000
city(pop) City, town or village with specified population. Commas will be ignored in pop. There should be no blanks. 1:30,000 ... 1:300,000
city City, town or village, unspecified population. Will be treated as a minor city. 1:100,000
airport 1:30,000
mountain peaks, mountain ranges 1:100,000
isle Isles, islands 1:100,000
waterbody Bays, fjords, lakes, reservoirs, ponds, lochs, loughs, meres, lagoons, estuaries, inland seas... 1:100,000
forest Forests and woodlands 1:50,000
river Rivers and canals 1:100,000
glacier Glaciers, ice caps 1:50,000
edu Schools, colleges, universities 1:10,000
pass mountain passes 1:10,000
railwaystation stations and stops of railway, train, railroad, metro, rapid transit, underground, subway, elevated railway, etc. 1:10,000
landmark Cultural landmark, building of special interest, tourist attraction and other points of interest. 1:10,000
Default scale: if no type is used or the type is not defined in the geohack extension 1:300,000

Scales in parentheses aren't defined yet in the geohack extension. type:state was withdrawn from the list.

Sample:

scale:N

Sets the desired map scale as 1:N. This will override the scale determined by the type:T parameter. If no type and scale parameters are defined, the default scale of the extension will be used (1:300,000).

The scale: parameter can be omitted.

Samples
Scale Markup Result
1:1000 {{coord|51.500611|N|0.124611|W|scale:1000}} 51°30′02″N 0°07′29″W / 51.500611, -0.124611
1:10,000 {{coord|51.500611|N|0.124611|W|scale:10000}} 51°30′02″N 0°07′29″W / 51.500611, -0.124611
1:100,000 {{coord|51.500611|N|0.124611|W|scale:100000}} 51°30′02″N 0°07′29″W / 51.500611, -0.124611
1:1,000,000 {{coord|51.500611|N|0.124611|W|scale:1000000}} 51°30′02″N 0°07′29″W / 51.500611, -0.124611

If the links to the map sites are correctly configured on GeoTemplate and a map is available for the scale, a corresponding map may be displayed.

region:R

Sets the preferred map region of coverage, used in selecting appropriate map resources for the area. If no region parameter is supplied, the geohack extension attempts to determine it from the coordinates.

The region should be supplied as either a two character ISO 3166-1 alpha-2 country code, or an ISO 3166-2 region code. E.g:

Samples:

Specific code:

  • XZ is used for objects in/above international waters (similar to UN/LOCODE).
  • ZZ is used in samples

globe:G

Specifies other worlds than Earth, such as Moon, Mars, Venus, Mercury.

Most features of the geohack extension are not made for other globes.

source:S

Specifies, where present, the data source and data source format/datum, and optionally the original data, presented in parentheses. This is initially primarily intended for use by geotagging robots, so that data is not blindly repeatedly copied from format to format and Wikipedia to Wikipedia, with progressive loss of precision and attributability.

Examples:

  • A lat/long geotag derived from a Ordnance Survey National Grid Reference NM 435 355 found in the English-language Wikipedia would be tagged as "source:enwiki-osgb36(NM435355)"
  • A latitude-longitude location sourced from data taken from the German-language Wikipedia would be tagged as "source:dewiki" -- and so on, for other language codes;
  • A location sourced from the public domain GeoNet Names Server database would be tagged as "source:GNS". No datum or format information is needed, since by default all Wikipedia coordinates are in latitude/longitude format based on the WGS84 datum. Similarly, U.S. locations sourced from the similar public domain GNIS database would be tagged as "source:GNIS".

Coordinate templates (currently used instead of geo tag)

As of September 2008, there are two ways of entering coordinates, which have achieved consensus:

  1. {{coord}} - Offers choice of input format and user-preference for display format, plus a Geo microformat. This may be placed anywhere in the article source text, in-line, along with prose text, e.g. "Mount Everest is at {{coord|27|59|16|N|86|56|40|E}}", which displays as "Mount Everest is at 27°59′16″N 86°56′40″E / 27.98778, 86.94444"; set to display the coordinates at the very top of the page, near the article's title, in a somewhat skin-dependent way, by using a display=title (see Krasnoyarsk hydroelectric dam for an example); or set to display both, using display=inline,title.
  2. Infoboxes - Many infobox templates for places have a field for specifying a place's coordinates. These may make use of {{coord}} and may therefore also cause display in the title bar. See Template:Infobox Settlement and Template:Infobox Mountain for examples (or for usage examples: Los Angeles and Mount Everest).

(Older coor * templates are now deprecated, and are being replaced by {{coord}}.)

If creating new templates or infoboxes, it is important that they are defined using {{coord}}.

Unless a template uses the coordinates in another way, the {{coord}} template should be the field value, for example {{infobox lake}} uses coords = {{coord|45|N|6|E|type:waterbody}}

If specific coordinates are to be entered directly into templates, templates other than {{coord}} should use the following variables for coordinates:

  • lat_d
  • lat_m
  • lat_s
  • lat_NS
  • long_d
  • long_m
  • long_s
  • long_EW

Where the United Kingdom's Ordnance Survey grid references are used as the coordinates, use (or create) a template which uses {{oscoor}}.

For articles which have no coordinates, but need them, use {{coord missing}}.

Comparison of Coordinates entry methods

     Template
Aspect 
free format {{coor}} coor d/dm/dms {{coord}} {{coordinate}}
Status unused in English Wikipedia, method prior to 2005 unused in English Wikipedia, was frequently used in other languages
deprecated
used in English Wikipedia 2005-2008
deprecated
current standard in English Wikipedia
(since September 2008)
current standard in de Wikipedia
(since February 2008)
deleted from English Wikipedia in September 2008
Sample 1° 2' N 5°12' W
(more)
{{coor| 1_2_N_5_12_W| 1°2'N, 5°12'W}} {{coor title dm| 2|46|N| 45|30|W| region:ZZ_type:landmark}} {{coord| 2|46|N|45|30|E| region:ZZ_type:landmark| display=title}} {{coordinate| NS=2/46/0/E| EW=5/12/0/W| type=landmark| article=/}}
Strengths

easy to enter

  • Well known set of templates
  • Data entered into template is validated (input validation)
  • Less overhead (2-3 subtemplates only). Can be included numerous times in tables (an estimated 3880 times in discussed sample)
  • partial support for microformat
  • supported by google
  • supports "name="
  • Frequently used (was)
  • One template for all input formats (dec/dms)
  • dec/dms format can be set in user stylesheet
  • well documented
  • input validation recently added
  • Frequently advocated
  • supported by google
  • supports microformat
  • supports "name="
  • Frequently used
  • uses of older templates are currently being migrated to this format using a bot
  • Data entered into template is validated (input validation)
  • One template for all input formats
  • named parameters for coordinates (NS=/EW=)
  • named parameters for type/region/globe etc.
  • Less overhead (5-10 subtemplates only).
  • can display text/icons instead of coordinates
  • support for elevation
  • supports microformat
  • supports "name="
  • Frequently used (in German Wikipedia)
Weaknesses

can't be parsed

coordinates need to be entered twice

  • type/region/globe/etc. parameters all gobbled up
  • d/m/s are entered in separate fields
  • to switch from dec to dms input, one needs to switch templates
  • not supported by mediawiki
  • type/region/globe/etc. parameters all gobbled up
  • coordinate parameters all gobbled up
  • display=title, display=inline,title lengthy
  • Many subtemplates (15-20). Its post-expand include size limits the number of coordinates that can be included in lists (689 times in sample discussed below)
  • rounding problems for dms display
  • d/m/s are entered in separate fields
  • not supported by mediawiki
  • more verbose format (15-20% more to type)
  • several subtemplates (5-10). Its post-expand include size limits the number of coordinates that can be included in lists (425 times in sample discussed below)
  • not supported by mediawiki
Risks
  • A series of templates rather than one
  • Complex template
  • more to convert if adopted
Opportunities
  • Interwiki standardisation

Linear features

For draft guidance on, and examples of, coordinates for linear features (rivers, roads, bridges, tunnels, etc.), see Wikipedia:WikiProject Geographical coordinates/Linear.

The map source page (currently Template:GeoTemplate)

To generate the list of map sources, the Mediawiki gis extension is required. The definition of the map sources page is via Wikipedia:Map sources. For further information, see the Mediawiki documentation.

NOTE: This mechanism is available, but currently not enabled for Wikipedia. The current solution is running on an external server as a proof-of-concept, and is available via {{coord}} family. The map source page produced is defined in the editable "Wikipedia:Map_sources" (sample currently at Template:GeoTemplate). In the interim solution, the URL of the actual map sources page request is:

The argument follows the same format as the geo tag.

How to obtain geographical coordinates

See Obtaining geographic coordinates

See also: Category:Articles needing coordinates, Maybe-Checker

Geodetic system

All coordinates specified through {{coord}} must be referenced to WGS84, or an equivalent datum. WGS84 is required for some of the conversions done by the geohack extension.

British national grid references of the Ordnance Survey use its own OSGB36 datum, which is correct for use in national grid references; the correct transformations will automatically be applied when national grid coordinates are used in {{oscoor}} tags. However, OSGB36 latidtude/longitude coordinates should not be used anywhere in Wikipedia; please use WGS84 lat/long instead.

Precision

Regardless of how coordinates are obtained, some thought should be given as to the precision used in a Wikipedia article. Generally, the larger the object being mapped, the less precise the coordinates should be. For example, if just giving the location of a city, precision greater than 100 meters is not needed unless specifying a particular point in the city, for example the central administrative building. Specific buildings or other objects of similar size would justify precisions down to 10 meters or even one meter in some cases. A general rule might be to avoid giving precisions greater than one tenth the size of the object described in the absence of a clear reason to do so. Overly precise coordinates can be misleading, by implying that the geographic area is smaller than it truly is.

In the two most-used coordinate representations, degrees-minutes-seconds and decimal degrees, precision is, as a useful approximation,

Degrees-minutes-seconds format
Precision Diff. at equator Diff. at 30° Diff. at 45° Diff. at 60°
111 km (~100 km) 96.4 km 78.7 km 55.7 km
1′ 1.85 km (~2 km) 1.61 km 1.31 km 0.93 km
0.1′ 185 m 161 m 131 m 93 m
1′′ 31 m (~30 m) 27 m 22 m 15 m
0.01′ 18.5 m 16.1 m 13.1 m 9.3 m
0.1′′ 3.1 m (~3 m) 2.7 m 2.2 m 1.5 m
0.01′′ 31 cm (~30 cm)
(~1 ft)
27 cm 22 cm 15 cm
Decimal degrees format
Precision Diff. at equator Diff. at 30° Diff. at 45° Diff. at 60°
111 km (~100 km) 96.4 km 78.7 km 55.7 km
0.1° 11 km (~10 km) 9.64 km 7.87 km 5.57 km
0.01° 1.1 km (~1 km) 964 m 787 m 557 m
0.001° 110 m (~100 m) 96.4 m 78.7 m 55.7 m
0.0001° 11 m (~10 m) 9.64 m 7.87 m 5.57 m
0.00001° 1.1 m (~1 m) 96.4 cm 78.7 cm 55.7 cm
0.000001° 11 cm (~10 cm)
(~4 in)
9.64 cm 7.87 cm 5.57 cm

Conversions: 1 kilometre (0.621 mi), 1 metre (3.28 ft), 1 centimetre (0.394 in); 1 mile (1.61 km), 1 foot (0.305 m), 1 inch (2.54 cm)

Distances along lines of latitude are the same at the equator but shrink toward the poles. Unless there is specific reason to take this into account, the distances along lines of longitude should suffice as a guide.

You can calculate the number of kilometers per degree of longitude using one of the following approximation formulas (θ is the latitude in degrees):

Best: k = \frac{\pi\cos(\theta)\sqrt{\frac{(6378^2\cos(\theta))^2+(6357^2\sin(\theta))^2}{(6378\cos(\theta))^2+(6357\sin(\theta))^2}}}{180}

Better: k = \frac{2\pi6378\cos(\theta)}{360}\, (6378 is Earth radius at equator)

Sufficient: k = 111.31709\cos(\theta)\,

Tools and applications based on coordinates from Wikipedia

Articles (and coordinates) can be found through the pages using the templates in Category:Coordinates templates

All coordinates are available for download in Wikipedia database dumps. To get the coordinates from the XML format dump of all articles (enwiki-latest-pages-articles.xml.bz2, 4 GB), the dump needs to be parsed for pages containing coordinates in the entry formats listed above. Most articles in Wikipedia conform to these formats and coordinates are easy to parse from the wikitext with regular expressions for simple character sequences. As all coordinates link to the same PHP tool, they may also be found from the SQL format table of external links (enwiki-latest-externallinks.sql.gz, 725MB). This second method will however not include all available information about the coordinates, such as their position between the article body and the title area.

There may exist some groups of articles that generate the coordinate data dynamically and are not in any of the standard entry formats, as some editors may have wished to facilitate entry of common coordinate related information, while only keeping the output similar with the existing templates. To get all such coordinates, all the articles in the database dump need to be run through a wikitext parser (such as the PHP one in MediaWiki) to expand all the templates, and the result parsed for coordinates. Alternatively, it is also possible to download the HTML generated from all the article and expanded template content (wikipedia-en-html.tar.7z, 14 GB).

Note that mass downloading individual pages from the live Wikipedia site is strongly discouraged and may lead to discontinued access.

NASA World Wind Samples

All examples use NASA World Wind, with the Wikipedia overlay. This is purely meant as an example of one thing that a coordinated concept for geographical coordinates can be used for.

Links to Wikipedia articles are represented by yellow rings, such as in this view of the Washington DC National Mall, using USGS aerial photos
Links to Wikipedia articles are represented by yellow rings, such as in this view of the Washington DC National Mall, using USGS aerial photos
This view of San Francisco is done using Landsat 7 satellite images. Again, note the rings that indicate Wikipedia articles
This view of San Francisco is done using Landsat 7 satellite images. Again, note the rings that indicate Wikipedia articles
Combining radar topographic (Shuttle Radar Topography Mission) data with Landsat-7 images allows full 3D visualization, producing images like this one, of Mount Baker. The upper ring is for the Space Needle. Note also that vertical exaggeration is enabled.
Combining radar topographic (Shuttle Radar Topography Mission) data with Landsat-7 images allows full 3D visualization, producing images like this one, of Mount Baker. The upper ring is for the Space Needle. Note also that vertical exaggeration is enabled.

View Wikipedia in Google Earth

Project Wikipedia-World scan 11 Dumps (ca,cs,de,en,eo,es,fi,fr,nl,pt,ru) and provides:

  • dynamic Google-Earth layers in 21 languages. For instance: english Layer
  • static Google-Earth layers in 10 language with different folders (Castles, Parks,...), Download at webkuehn.de
  • SQL-Data off all scanned coordinates

Visualization of Wikipedia articles with Google Maps

  • PINTOMAP searches the whole Wikipedia-Database for coordinates and visualizes them on a Google-Map.
  • www.geonames.org over 800,000 Wikipedia articles in 230 languages on Google maps. The placemarks include short descriptions of the displayed items, extracted from the Wikipedia articles. Webservices for full text search and reverse geocoding of wikipedia articles.

WikiMiniAtlas JavaScript plugin

WikiMiniAtlas in action
WikiMiniAtlas in action

WikiMiniAtlas is a JavaScript to add to your monobook.js. It adds a draggable and zoomable (just like GoogleMaps) map to all geo-coded articles. Clickable labels with links other geocoded articles are placed on the map to allow spatial browsing of wikipedia. Map layers include satellite images (using Landsat7 data) with zoomlevels down to a resolution <100m, and daily updated MODIS satellite data.

WikiMiniAtlas is currently enabled on Wikipedia (by clicking on the globe () beside the coordinates).

All geodata in SQL file format

  • Project Wikipedia-World, provides the complete database for download in SQL-file format.

Export multiple coordinates

Kmlexport tool: Pages marked with multiple coordinates or categories of articles with coordinates can be exported as KML (for use in Google Earth, for example). This tool and some alternatives can be found on clicking the coordinates or by applying the {{GeoGroupTemplate}} template on a page.

The Kmlexport can be used directly or through Google Maps; see for example Colmar Pocket or Category:Capitals in Europe. Export from articles is real-time, export from categories is based on stored extractions (may be several weeks old).

KML may be converted in other formats, suitable as Points of Interest (POI) for GPS systems.

Other sources:

Coordinates search tool

tools:~dispenser/cgi-bin/geosearch.py allows for regular expression searching on the GeoHack links in the external links table. This has the advantages of near real time information and powerful pattern matching. The following are some example queries created as a demonstration of the flexibility of the system.

Sample searches
Description MySQL Regular expression query
Coordinates imported from the CSWiki _source:cswiki
Cities whose populations are under 1,000 _type:city_*\([0-9]{0,3}\)
Antarctic Circle (approximate) =(66_[3-9]|66.[6-9]|6[7-9]|[7-9][0-9])[0-9_.]*_S_
Locations near Manhattan, NY =40(_4[2-9]|.7|.8[0-5])[0-9_.]*_N_(73_5[5-9]|73.9|74_0?[0-2]|74.0)[0-9_.]*_W
Error detection
Description MySQL Regular expression query Status Date
Articles missing metadata (no type or region) _[WE]_+($|&title|\{+[[:digit:]]\}+) many
Missing W/E _[NS]_[^WE]+_*($|&title|\{+[[:digit:]]\}+) 490 2008-08-30
N/S mixed up with E/W _[EW]_[0-9._]+_[NS]_+ ☑.svg 2008-08-30
coordinates with "O"
for W (Oeste) or E (Ost)
_[NS]_[^WE]+O ☑.svg 2008-09-02
Bad template parameters \{\{\{[3468]\}\}\} 50 2008-08-23
missing ":" in parameters _(region|source|scale|globe|type)_+ 70 remain 2008-08-23
location: instead of region: location: ☑.svg 2008-08-24
non standard region codes region:[^A-Z] ☑.svg 74+24 2008-08-31
invalid region codes region:(UK|EU|FL|JA) ☑.svg 2008-08-30
invalid region codes region:(JA|LF|PI|RA|RB|RC|RH|RI|RL|RM|RN|RP|WG|WL|WV|YV|O[A-LN-Z]|R[A-DF-NP-R]|Z[B-LN-VX-Z]|Q[B-Z]|X[AY]|UK|EU|AA|FL|EW|DY) ☑.svg 1 2008-08-30
text as region code region:[A-Z][^A-Z] 23 2008-08-31
invalid types type:(school|university) ☑.svg 2008-08-30
invalid types type:island ☑.svg 1 remains (database bug) 2008-08-24
invalid types type:lake ☑.svg 2 remain 2008-08-23
parameters in caps (Scale:|Type:|Region:|Source:) ☑.svg 6 2008-09-02
elements from samples (optional|type:T|region:ZZ|globe:G) 32 2008-09-03

World map displaying the concentration of wikipoints

Wikipedia-World allows generating such maps (see here)
Wikipedia-World allows generating such maps (see here)


See also

External links

References

Could not update stat
UP