Template:Location/general documentation

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

This is a family of templates used to geo-code Commons images. See Commons:Geocoding for information on how to find coordinates for your images.

In most cases, camera location is preferred and most images should use the first two templates. However, in some cases object location—which indicates the position of the main subject of the photograph—makes more sense, for example when providing the location of a painting or sheet music. It can also be used to point to a nearby feature instead of giving the exact location of the main object, e.g. when you do not want to reveal the exact location of a rare plant.

Those templates output a Geo_(microformat) and add images to either Category:Media with locations or Category:Media with erroneous locations.

Object location tags do not add the picture onto the Geocommons layer for Google maps and Google Earth, so if you know the camera location and want the picture to be shown in this layer, use the camera location tag instead.

Syntax

[edit]

{{Location|Degree|Minute|Second|Latitude|Degree|Minute|Second|Longitude|Information attributes}}
{{Location|Degree Latitude|Degree Longitude|Information attributes}}</nowiki>
{{Object location|Degree|Minute|Second|Latitude|Degree|Minute|Second|Longitude|Information attributes}}
{{Object location|Degree Latitude|Degree Longitude|Information attributes}}</nowiki>
{{Globe location|Degree|Minute|Second|Latitude|Degree|Minute|Second|Longitude|Globe|Information attributes}}
{{Globe location|Degree Latitude|Degree Longitude|Globe|Information attributes}}

Syntax examples of "Information attributes": (Don't use spaces instead of underscores!)
heading:180
region:XX-YYY_heading:45
region:XX-YYY_scale:10000_heading:SW

Don't use parameter "type", it is hardcoded as "camera". Use "scale" or "dim" to indicate a suitable map region size to display the picture.

Examples

[edit]
{{Location}} example
Code {{Location|34|1|27.37|N|116|9|29.88|W|region:DE-NI_heading:SE}}
Produces
Camera location34° 01′ 27.38″ N, 116° 09′ 29.88″ W  Heading=135° Kartographer map based on OpenStreetMap.View all coordinates using: OpenStreetMapinfo
Code {{Location|34° 01′ 27.38″ N, 116° 09′ 29.88″ W|region:DE-NI_heading:SE}}
Produces
Camera location34° 01′ 27.38″ N, 116° 09′ 29.88″ W  Heading=135° Kartographer map based on OpenStreetMap.View all coordinates using: OpenStreetMapinfo
Code {{Location|34° 01′ 27.38″ N|116° 09′ 29.88″ W|region:DE-NI_heading:SE}}[1]
Produces
Camera location34° 01′ 27.38″ N, 116° 09′ 29.88″ W  Heading=135° Kartographer map based on OpenStreetMap.View all coordinates using: OpenStreetMapinfo
Code {{Location|34.02427|-116.15830|region:DE-NI_scale:10000_heading:SW}}[1]
Produces
Camera location34° 01′ 27.37″ N, 116° 09′ 29.88″ W  Heading=225° Kartographer map based on OpenStreetMap.View all coordinates using: OpenStreetMapinfo
{{Object location}} example
Code {{Object location|34.02427|-116.15830|region:DE-NI_scale:10000}}[1]
Produces
Object location34° 01′ 27.37″ N, 116° 09′ 29.88″ W Kartographer map based on OpenStreetMap.View all coordinates using: OpenStreetMapinfo
{{Globe location}} example
Code {{Globe location|34.02427|-116.15830|moon}}[1]
Produces
Location34° 01′ 27.37″ N, 116° 09′ 29.88″ W Kartographer map based on OpenStreetMap.View all coordinates using: OpenStreetMapinfo
Code {{Globe location|34|1|27.37|N|116|9|29.88|W|mars}}
Produces
Location34° 01′ 27.38″ N, 116° 09′ 29.88″ W Kartographer map based on OpenStreetMap.View all coordinates using: OpenStreetMapinfo

Note that with the two templates above, you should indicate camera position and not object position. To make clear what was photographed, add the heading:xyz parameter using degrees or direction acronyms as shown on the compass. See Commons:Geocoding#Parameters for more information.

Also note that the output of those two templates is identical despite of different inputs.

The syntax and output of the {{Object location}} template is the same, except for the word "Object" in the template name resulting in the use of Object Location phrase instead of Camera Location in the output.

  1. a b c d 0 (also with 1=/Lat= and/or 2=/Lon=)

Parameters

[edit]
{{Location}} and {{Object location}} parameters
Parameter Mandatory or Optional Default Description
{1} Mandatory 0none Degrees of Latitude
{2} Mandatory 0none Minutes of Latitude
{3} Mandatory 0none Seconds of Latitude
{4} Mandatory 0none Latitude Direction (N or S)
{5} Mandatory 0none Degrees of Longitude
{6} Mandatory 0none Minutes of Longitude
{7} Mandatory 0none Seconds of Longitude
{8} Mandatory 0none Longitude Direction (W or E)
{9} Optional type:landmark region:XX-YYY_scale:_heading:
{{Location}} and {{Object location}} decimal parameters
Parameter Mandatory or Optional Default Description
{1} Mandatory (1=) or Lat= 0none Degrees of Latitude
{2} Mandatory (2=) or Lon= 0none Degrees of Longitude
{3} Optional type:landmark region:XX-YYY_scale:_heading:
{{Location}} and {{Object location}} Lat/Lon parameters
Parameter Mandatory or Optional Default Description
{1} Mandatory (1=) or Lat= 0none 4 Lat-values: D° M′ S″ N/S
{2} Mandatory (2=) or Lon= 0none 4 Lon-values: D° M′ S″ E/W
{3} Optional type:landmark region:XX-YYY_scale:_heading:
{{Location}} and {{Object location}} D-M-S parameters
Parameter Mandatory or Optional Default Description
{1} Mandatory 0none D° M′ S″ N/S, D° M′ S″ E/W
{2} Optional type:landmark region:XX-YYY_scale:_heading:
{{Globe location}} parameters
Parameter Mandatory or Optional Default Description
{1} Mandatory 0none Degrees of Latitude
{2} Mandatory 0none Degrees of Longitude
{3} Mandatory Earth Globe - Supported types: Mars, Moon, Venus, Mercury, Titan, Ganymede
{4} Optional type:landmark region:XX-YYY_scale:_heading:
Compass rose

Where:

  • region:XX-YYY
  • XX is an ISO 3166-1 alpha 2 country code abbreviation, and
  • YYY is a 1-, 2- or 3- characters ISO 3166-2 (see en:ISO 3166-2#Format for details) province/region/state code abbreviation (typically the same as a local postal code abbreviation).
  • type: is a class descriptor about the object. It is defined by geohack.php and mapsources.php on ToolServer.Org and corresponding documentation can be found on en:WP:GEO. NOTE: type:landmark is hard-coded default value
  • scale: is an information about which range the image covers, given in meters (1000 is 1 kilometer). Scale is defaultly set with the parameter "type" and that's why it is unadvisable to use it at Commons.
  • heading: is either a compass rose point (up to four letters) or degree heading (zeropoint North, clockwise).

Translation

[edit]

To create a new language version of all four templates, create a new subpage of Template:Location, cut and paste code below and translate terms in bold letters. For some languages it might also make sence to translate optional labels written in italics.

{{Location/layout 
| lat = {{{lat}}}
| lon = {{{lon}}}
| attributes = {{{attributes}}}
| NoError = {{{NoError}}}
| mode = {{{mode}}}
| globe = Earth
| lang = {{subst:SUBPAGENAME}}
| Location-label3 = Location on {{#switch: {{{globe|Earth}}} | Mars = Mars | Moon = Moon | Venus = Venus | Mercury = Mercury
| Titan = Titan | Ganymede = Ganymede | Earth = Earth}}
| Location-label1 = Camera Location
| Location-label2 = Object Location
| Link-label = This and other images at their location on:
| GoogleMaps = Google Maps
| GoogleEarth = Google Earth
| OpenStreetMap = OpenStreetMap
| Proximityrama = Proximityrama
| Info-label = Info
| N = N
| S = S
| W = W
| E = E
}}<noinclude>{{translated tag|infobox}}</noinclude>

Placement on file description pages

[edit]

{{Location}} is generally placed just after {{Information}}.

If there is an object location template (sample: {{Object location}}), it is placed just below the camera location template.

Both would be followed by the license header if present: =={{int:license-header}}==

See also

[edit]