WikiProject Geographical coordinates aims to better organize location information in articles containing a set of numbers that identifies location on and relative to the Earth. In particular, we aim 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.
Quick Geographical coordinates how to
NOTE: This is a concept currently under development, so this is subject to change.
"title" means that the coordinates will be displayed next to the article's title at the top of the page (in desktop view only; title coordinates do not display in mobile view) and before any other text or images. It also records the coordinates as the primary location of the page's subject in Wikipedia's geosearch API.
Use |display=title (or |display=inline,title) once per article, for the subject of the article, where appropriate.
Per WP:ORDER, the template is placed at the bottom of the article in the 'end matter', after any navigation templates, but before all categories, including the {{DEFAULTSORT}} template. This template may also be placed within an infobox, instead of at the bottom of the article.
Should provide a uniform markup for all geographic coordinates
Should provide a user-preferred appearance for all geographic coordinates
Markup should be easy and natural to use
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
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.
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).
Serve as a tool for finding Wikipedia articles describing nearby locations. See also meta:Wikipediatlas.
Adhere to existing Internet standards for geographic coordinates as far as possible[clarification needed] such as using WGS84 for terrestrial coordinates
In general, coordinates should be added to any article about a location, structure, or geographic feature that is more or less fixed in one place. Such items can vary in size from a single tree (or smaller) to entire oceans or continents. Coordinates should also be added to articles about events that are associated with a single location, for example, the Ufa train disaster. Guidelines for less obvious situations are given below.
Coordinates are appropriate for the top articles or within infoboxes of the following types of articles:
Businesses/organizations with a single location (even if they are defunct)
Demolished buildings/structures
Buildings/structures that have been proposed, but not yet built (if there is a reliable source for the location)
Permanently docked ships (and shipwrecks)
Do not add coordinates to the following types of articles:
Biographies of living people
Works of art (other than permanent outdoor statues, installations or murals)
Sports teams (add to the stadium article instead)
Businesses with multiple locations (although listing coords for individual locations in a table may be appropriate)
Ships that are not permanently docked or sunk
Other types of articles may be decided on a case-by-case basis.
For villages, towns, communities, etc., use the current centre. Where this is difficult, choose the earliest known settlement of that name. Be aware that the GNIS coordinates may be an arbitrarily chosen civic feature, as that was the usual rule.
For military and industrial establishments (e.g., castles, barracks, dockyards, car plants) use the main gate.
For administrative districts, use the head office.
For geographical features with an area, such as lakes, reservoirs, and islands, use a point reasonably in the center of the feature. (Remember not to specify too much precision; see Precision guidelines below.)
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.Geographical coordinatesWikipedia:WikiProject Geographical coordinatesTemplate:WikiProject Geographical coordinatesGeographical coordinates articles
Implementation details
Coordinate templates
There are two ways of specifying coordinates:
{{coord}} – Accepts multiple data formats and supports a style sheet preference for display format, plus a Geo microformat. Coord may be placed anywhere in the article source text, inline, with prose text. For example "Mount Everest is at {{coord|27|59|16|N|86|56|40|E}}", which displays as "Mount Everest is at 27°59′16″N86°56′40″E / 27.98778°N 86.94444°E / 27.98778; 86.94444". To display coordinates at the page's top, near the article's title, in a skin-dependent way, use display=title (see example at Krasnoyarsk hydroelectric dam). To display both inline and top, use display=inline,title.
(Before September 2008, there was a widely-used family of templates of the form coor .... These are deprecated and have been replaced by {{coord}}. For an overview of choices: WikiProject Geographical coordinates/comparison.)
Parameters
Following the geographical coordinate, further parameters can optionally be supplied, separated by underscores. This helps display suitable map resources (see Template:GeoTemplate), and will help Wikimaps become fully functional.
Administrative unit of country, 3rd level, see table
1:100,000
airport
airports and airbases
1:30,000
city(pop)
cities, towns, villages, hamlets, suburbs, subdivisions, neighborhoods, and other human settlements (including unincorporated and/or abandoned ones) with known population Please replace pop with a number. Commas in pop will be ignored. There should be no blanks.
1:30,000 ... 1:300,000
city
cities, towns, villages, hamlets, suburbs, subdivisions, neighborhoods, and other human settlements (including unincorporated and/or abandoned ones) with unspecified population These are treated as minor cities.
1:100,000
country
(e.g. "type:country")
1:10,000,000
edu
schools, colleges, and universities
1:10,000
event
one-time or regular events and incidents that occurred at a specific location, including battles, earthquakes, festivals, and shipwrecks
1:50,000
forest
forests and woodlands
1:50,000
glacier
glaciers and icecaps
1:50,000
isle
islands and isles
1:100,000
landmark
buildings (including churches, factories, museums, theatres, and power plants but excluding schools and railway stations), caves, cemeteries, cultural landmarks, geologic faults, headlands, intersections, mines, ranches, roads, structures (including antennas, bridges, castles, dams, lighthouses, monuments, and stadiums), tourist attractions, valleys, and other points of interest
1:10,000
mountain
peaks, mountain ranges, hills, submerged reefs, and seamounts
1:100,000
pass
mountain passes
1:10,000
railwaystation
stations, stops, and maintenance areas of railways and trains, including railroad, metro, rapid transit, underground, subway, elevated railway, etc.
1:10,000
river
rivers, canals, creeks, brooks, and streams, including intermittent ones
The dim: parameter defines the diameter of a viewing circle centered on the coordinates. While the default unit of measurement is metres, the km suffix may be appended to indicate kilometres. The dim: parameter overrides the scale implied by any type: parameter.
Syntax — dim:<width><units>
width — integer number of metres (m) or kilometres (km)
units — m or km, if not specified, defaults to m
GeoHack uses dim: to select a map scale such that the viewing circle appears roughly 10 centimetres (4 in) in diameter on a 72 dpi computer monitor. If no dim:, type:, or scale: parameters are provided, GeoHack uses its default viewing circle of 30 kilometres (19 mi).
The scale: parameter specifies the desired map scale as 1:N, overriding the scale implied by any type: parameter.
GeoHack uses scale: to select a map scale for a 72 dpi computer monitor. If no dim:, type:, or scale: parameters are provided, GeoHack uses its default scale of 1:300,000.
The region: parameter specifies the political region for terrestrial coordinates. It is used to select appropriate map resources. If no region: parameter is provided, GeoHack attempts to determine the region 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.
Very rough mapping is provided on geohack for almost all supported globes. The pop-out WikiMiniAtlas system provides limited mapping for Moon, Mars, Mercury, Venus, Io, and Titan, as of February 2021[update].
The maps roughly implies a coordinate reference system, but does not clearly specify one (unlike Earth's WGS84). Since the template defaults to east longitude, the |W| direction must be specified for globes that measure longitude westward. For celestial coordinates, use {{Sky}} instead.
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 an Ordnance SurveyNational 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, US locations sourced from the similar public domain GNIS database would be tagged as "source:GNIS".
If an article contains several display=inline coordinates, each of these may be supplied with a unique name. This name will be used to display the coordinate on the WikiMiniAtlas, and will cause the template to emit an hCardmicroformat using that name, even if used within an existing hCard. Do not use when the name is that of a person (e.g for a gravesite), as the generated hCard would be invalid. Also, do not use square brackets in names.
To always display coordinates as DMS values, add this to your common.css:
If CSS is disabled, or you have an old copy of MediaWiki:Common.css cached, you will see both formats. (You can either clear your cache or manually refresh this URL: [1].)
To disable display of the blue globe adjacent to coordinates, add this to your common.js:
format=dec will reformat the coordinates to decimal degrees for all readers.
format=dms will reformat the coordinates to degrees | minutes | seconds (dms) format for all readers.
Creating new templates
When creating new templates or infoboxes, use {{coord}}. Unless a template uses the coordinate data in another way, the {{coord}} template should be the field value. For example, {{infobox lake}} accepts coords = {{coord|45|N|6|E|type:waterbody}}.
If coordinate data are used directly by a template, use the following parameter names for coordinates:
lat_d
lat_m
lat_s
lat_NS
long_d
long_m
long_s
long_EW
A provision for accepting decimal coordinates is recommended. For example, allow lat_d = 45.678 | long_d = -123.456 and omission of the remaining parameters.
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 latitude/longitude coordinates should not be used anywhere in Wikipedia; please use WGS84 lat/long instead.
Regardless of how coordinates are obtained, consider the precision specified in a Wikipedia article. Reliable secondary sources exist for some locations. Without a reliable source, the larger the object being mapped, the less precise the coordinates need to be. Cities must be specified with a precision of degrees, minutes and seconds to respect historical norms. When the #Which coordinates to use guideline is used, degrees, minutes and seconds or d.dddd are the default. To specify a particular point in the city, such as a building, generally requires precision down to degrees-minutes-seconds or d.dddd° if decimal degrees are used. In the case of objects such as fountains or statues, it may be necessary to use d°m's.s" or d.ddddd°. Higher precisions should be avoided, as they greatly exceed the accuracy of civilian GPS and online mapping services. (Using 4 m accuracy as an estimate for civilian GPS: Depending on the coordinates format and the latitude, the next-higher precisions exceed the accuracy by a factor of somewhere between 13 and 72.)
A general rule is to give precisions approximately one-tenth the size of the object, unless there is a clear reason for additional precision. Overly precise coordinates can be misleading by implying that the object is smaller than it truly is.
There is no set way to determine object size, and the boundaries of many geographical objects are not clearly defined or not readily available. The difference rarely affects the suggested coordinates precision, so a rough size estimate is usually adequate. However, it should be noted that object size is always linear (one-dimensional), not an area measurement.
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°
1°
111 km
96.4 km
78.7 km
55.7 km
1′
1.85 km
1.61 km
1.31 km
0.93 km
0.1′
185 m
161 m
131 m
93 m
0.01′
18.5 m
16.1 m
13.1 m
9.3 m
1′′
31 m
27 m
22 m
15 m
0.1′′
3.1 m
2.7 m
2.2 m
1.5 m
Decimal degrees format
Precision
Diff. at equator
Diff. at 30°
Diff. at 45°
Diff. at 60°
1°
111 km
96.4 km
78.7 km
55.7 km
0.1°
11 km
9.64 km
7.87 km
5.57 km
0.01°
1.1 km
964 m
787 m
557 m
0.001°
110 m
96.4 m
78.7 m
55.7 m
0.0001°
11 m
9.64 m
7.87 m
5.57 m
0.00001°
1.1 m
96.4 cm
78.7 cm
55.7 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)
The values in the table give distances in the east-west direction corresponding to a small change in longitude, at different latitudes. You can take the equator columns of the table as a rough guide to distances in the north-south direction that correspond to a small change in latitude, since they vary only a little bit at different latitudes. For simplicity, however, the latitude precision is commonly copied from that of the longitude.
The following tables show suggested coordinates precisions for various object sizes and latitudes. Refer to the preceding section for more information about coordinates precision. To use these tables:
Choose one of the tables depending on whether you want degrees-minutes-seconds format or decimal degrees format
Find the column that is closest to the latitude of your object
Find the row that is closest to the size of your object
Note the coordinates precision at the intersection of your row and column
Usage example
Example: You want coordinates, in decimal degrees format, for Yosemite National Park, California, U.S.
The size of the object is roughly 70 km
GNIS query gives the Park's location, in decimal degrees, as: 37.8483188 (north latitude), −119.5571434 (west longitude)
To solve:
Choose the Decimal degrees format table
Find the 45° column; 37.8483188 is (slightly) closer to 45° than to 30°
Find the 50 km row; 70 km is closer to 50 km than to 100 km
Note the precision at the intersection of row and column: d.d°
(This is a good example of a borderline case, as the latitude is quite close to 37.5°, the midpoint between 30° and 45°. If the Park were a mere 25 miles to the south, you would use the 30° column instead, yielding a different precision: d.dd°. You could opt for that precision instead, giving 37.85, −119.56. That's your call. But the table shows that more than two decimal positions would definitely be too precise for this case.)
Degrees-minutes-seconds format
0°
30°
45°
60°
10 m
d° m' s.s" or d.ddddd° [note 3]
d° m' s.s"
50 m
d° m' s.s"
d° m' s.s"
d° m' s.s"
d° m' s.s"
100 m
d° m' s.s"
d° m' s.s"
d° m' s.s"
d° m' s"
500 m
d° m' s"
d° m' s"
d° m' s"
d° m' s"
1000 m 1 km
d° m' s"
d° m' s"
d° m' s"
d° m' s"
5 km
d° m' s"
d° m' s"
d° m' s"
d° m'
10 km
d° m'
d° m'
d° m'
d° m'
50 km
d° m'
d° m'
d° m'
d° m'
100 km
d° m'
d° m'
d° m'
d° m'
500 km
d° m'
d°
d°
d°
1000 km
d°
d°
d°
d°
Decimal degrees format
0°
30°
45°
60°
10 m
d.ddddd°
d.ddddd°
d.ddddd°
d.ddddd°
50 m
d.ddddd°
d.ddddd°
d.dddd°
d.dddd°
100 m
d.dddd°
d.dddd°
d.dddd°
d.dddd°
500 m
d.dddd°
d.dddd°
d.ddd°
d.ddd°
1000 m 1 km
d.ddd°
d.ddd°
d.ddd°
d.ddd°
5 km
d.ddd°
d.ddd°
d.dd°
d.dd°
10 km
d.dd°
d.dd°
d.dd°
d.dd°
50 km
d.dd°
d.dd°
d.d°
d.d°
100 km
d.d°
d.d°
d.d°
d.d°
500 km
d.d°
d.d°
d°
d°
1000 km
d°
d°
d°
d°
The tables are derived from the precision data at § Precision guidelines, above. As suggested there, they use a target resolution of one-tenth of the object size.
The tables are not perfect. Some cases will yield a precision that is different from what you would get by doing the math (including trigonometry) for that specific case. This is because it is impossible to represent all cases correctly in a usable tabular format. The tables provide the correct precision for a majority of cases. Any error should be limited to one level of precision (e.g., d° m' vs. d° m' s", or d.ddd° vs. d.dddd°), which is acceptable for the purposes of Wikipedia coordinates.
d.ddddd° is roughly three times more precise than d° m' s.s".
Mathematical formulas
You can also calculate the kilometers per degree of longitude, k, using one of the following formulas (θ is the latitude, 6378.14 km is the equatorial radius, and 6356.8 km is the polar radius):
conversions are done based on external links to mapsources in other languages
the iwlog determines primary coordinates for articles in other languages
in general, primary coordinates are imported to this wiki
coordinates are used to replace {{coord missing}} with {{coord}} with the parameter display=title
dms or decimal format is kept, format=dms can be added to decimal coordinates
negative coordinates followed by N or E are converted to positive coordinates followed by S or W
coordinates are not imported if:
degrees are out of range (90°/180°)
minutes or seconds >= 60
region doesn't start with [a-zA-Z] [a-zA-Z]
type is not in list. A few are corrected (e.g. village=>city, lake=>waterbody, dam=>landmark, island=>isle). coordinates with type:state are not converted. Numbers other than population are stripped.
globe is present
scale is kept, zoom from nl: converted to scale. scale can be dropped if it's equivalent to the one determined by type
source is set to "xxwiki" (xx being the wiki the coordinates are imported from). An additional string can be added to differentiate one bot from others (e.g. "-x"). If source: is used in the other language, the previous element is added after a slash, e.g. source:gnis imported from xx: wiki => source:xxwiki-gnis
region is set to uppercase, type and scale to lowercase
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.
All examples use NASA World Wind, with the Wikipedia overlay. This is purely meant as an example of using a coordinated concept for geographical coordinates.
View Wikipedia in Google Earth
Project Wikipedia-World scan 11 Dumps (ca,cs,de,en,eo,es,fi,fr,nl,pt,ru) and provides:
static Google-Earth layers in 10 language with different folders (Castles, Parks,...), Download at webkuehn.de
SQL-Data of all scanned coordinates
Copernix.io - View and search Wikipedia Articles on a map
Copernix.io is a geographical search engine allowing users to search places and information from Wikipedia on a map. Users can leave the search bar empty to see all pages within an area or type a query to get subject specific information.
Visualization of Wikipedia articles with Google Maps
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 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 to 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 {{GeoGroup}} 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:
Wikitude provides coordinates as KML or TomTom POI format.
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.
Signpost/2010-03-22,New commercial Wikipedia iPhone app "Nearby" provides a map with links to geotagged Wikipedia articles in the vicinity.
Signpost/2010-05-03, "The Wikimedia Foundation has updated the official "Wikipedia Mobile" iPhone app, first released in August 2009. New features include an improved layout, bookmarkable articles, and plotting geolocated articles near to the user's location on a map. The app is a free download from the App Store."
Signpost/2010-11-01, "One million geocoordinates: Last week, the number of geographical coordinates on the English Wikipedia surpassed one million, in around 620,000 articles. At the same time, around 180,000 articles were marked as needing coordinates (which would correspond to a completion rate of 78% if no more geocodable articles were added). In September 2009, the milestone of half a million articles with geocoordinates had been reached (see Signpost coverage). In related news, links to display interactive OpenStreetMap maps within articles were recently enabled by default on the German and Norwegian (Bokmål/Rikmål) Wikipedias (to see an example, click "Karte" on the top right of de:Berlin), the fruit of a collaboration that had been begun last year, supported by the German Wikimedia chapter (see Signpost coverage)."
References
External links
3.4.2 GEO type definition to specify information related to the global positioning of the object that a vCard represents.RFC2426
How latitude and longitude are stored in a DNS record.RFC1876
Memo describing a method of adding simple geographic position information to HTTP transactions using extension headers.[2]
Memo describing a method of registering HTML documents with a specific geographic location through means of embedded META tags.[3]
Proposal to create a new IANA Time Zones registration process as a central repository for time zone names.[4]
WikiProject Geographical coordinates hot articles watchlist.[5][dead link]