|
Wikipedia:Coordinates edit
|
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.
| Quick "how to" |
|---|
To add the coordinates 57°18′22"N 4°27′32"W to the top of an article, use
|
For decimal coordinates, such as 44.112°N 86.913°W, use one of
|
| Values (including degrees, minutes and seconds) are separated by a pipe ("|"). Latitude (N/S) before longitude (E/W). Map datum is WGS84. Please don't be overly precise (0.0001° is <11 m, 1′′ is <31 m). |
| For full details on the use of {{coord}}, see Template:Coord See also: Obtaining coordinates, coordinate conversion |
WikiProject on Geographical coordinates
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.
Parent: WikiProject Maps, then WikiProject Geography
Descendant: Wikipedia-World
Other WikiProjects that make use of geographical coordinates include:
Userbox: {{User WikiProject Geographical_coordinates}}
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
The template {{WPcoord}} may be added to relevant Talk pages. This adds the page to several categories and displays as:
| WikiProject Geographical coordinates | |||||
|---|---|---|---|---|---|
|
There are two ways of specifying coordinates:
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}}.)
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.
It has
Sets the type of this location, which will be used for the reverse mapping of the points. Type will set default map scale. If the default map scale is not appropriate, consider adding a scale:N parameter.
It is also used to select marker icons for the WikiMiniAtlas.
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:
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.
| Scale | Markup | Result |
|---|---|---|
| 1:1000 | {{coord|51.500611|N|0.124611|W|scale:1000}} | |
| 1:10,000 | {{coord|51.500611|N|0.124611|W|scale:10000}} | |
| 1:100,000 | {{coord|51.500611|N|0.124611|W|scale:100000}} | |
| 1:1,000,000 | {{coord|51.500611|N|0.124611|W|scale:1000000}} |
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.
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:
Specifies other worlds than Earth, such as Moon, Mars, Venus, Mercury.
Most features of the geohack extension are not made for other globes.
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:
{{coord}} takes |name=name
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 hCard microformat 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.
By default coordinates are displayed in the format in which they are specified.
To always display coordinates as DMS values, add this to your monobook.css:
.geo-default { display: inline }
.geo-nondefault { display: inline }
.geo-dec { display: none }
.geo-dms { display: inline }To always display coordinates as decimal values, add this to your monobook.css:
.geo-default { display: inline }
.geo-nondefault { display: inline }
.geo-dec { display: inline }
.geo-dms { display: none }To display coordinates in both formats, add this to your monobook.css:
.geo-default { display: inline }
.geo-nondefault { display: inline }
.geo-dec { display: inline }
.geo-dms { display: inline }
.geo-multi-punct { display: inline }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: [2].)
See also Wikipedia:Manual of Style (dates and numbers)#Geographical coordinates.
When creating new templates or infoboxes, use {{coord}}. Unless a template uses the coordinate data in another way (such as creating a dot on a standard map), 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:
|
|
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.
Where the United Kingdom's Ordnance Survey grid references are used as the coordinates, use {{oscoor}}.
For articles which have no coordinates, but need them, use {{coord missing}}.
For draft guidance on, and examples of, coordinates for linear features (rivers, roads, bridges, tunnels, etc.), see Wikipedia:WikiProject Geographical coordinates/Linear.
See Obtaining geographic coordinates
See also: Category:Articles needing coordinates, Maybe-Checker
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. Generally, the larger the object being mapped, the less precise the coordinates should be. For example, the location of a city can be specified with a precision of 100 meters, or even 1 km. To specify a particular point in the city, such as the central administrative building, or a fountain would justify precisions down to 10 meters or even one meter in some cases.
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 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,
|
|
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: 
Better:
(6378 is Earth radius at equator)
Sufficient: 
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.
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
|
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.
|
Project Wikipedia-World scan 11 Dumps (ca,cs,de,en,eo,es,fi,fr,nl,pt,ru) and provides:
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).
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:
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.
| 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 |
| Description | MySQL Regular expression query | Status | Date |
|---|---|---|---|
| Articles missing metadata (no type or region) | _[WE]_+($|&title|\{+[[:digit:]]\}+) |
||
| Missing W/E | _[NS]_[^WE]+_*($|&title|\{+[[:digit:]]\}+) |
2008-08-30 | |
| N/S mixed up with E/W | _[EW]_[0-9._]+_[NS]_+ |
2008-08-30 | |
| coordinates with "O" for W (Oeste) or E (Ost) |
_[NS]_[^WE]+O |
2008-09-02 | |
| Bad template parameters | \{\{\{[3468]\}\}\} |
2008-08-23 | |
| missing ":" in parameters | _(region|source|scale|globe|type)_+ |
2008-08-23 | |
| location: instead of region: | location: |
2008-08-24 | |
| non standard region codes | region:[^A-Z] |
2008-08-31 | |
| invalid region codes | region:(UK|EU|FL|JA) |
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) |
2008-08-30 | |
| text as region code | region:[A-Z][^A-Z] |
2008-08-31 | |
| invalid types | type:(school|university) |
2008-08-30 | |
| invalid types | type:island |
2008-08-24 | |
| invalid types | type:lake |
2008-08-23 | |
| parameters in caps | (Scale:|Type:|Region:|Source:) |
2008-09-02 | |
| elements from samples | (optional|type:T|region:ZZ|globe:G) |
2008-09-03 |
References