Last modified on 1 May 2014, at 12:13

Template:Location

Camera location latitude, longitude View this and other nearby images on: OpenStreetMap - Google Maps - Google Earth info
Documentation icon Documentation[view] [edit] [history] [purge]

This documentation is transcluded from Template:Location/doc.

Syntax #1: decimal degrees

Template used for geocoding Commons images, providing camera location using decimal or degrees/minutes/seconds (DMS) syntax. See Commons:Geocoding for more information.

{{Location}} is the main template of the {{Location}}, {{Object location}} and {{Globe location}} family and is supposed to be used to define the coordinates and heading of the location of the camera.

The template automatically sets the following categories: Depending on namespace:

In case of errors:

Usage

{{Location |1= |2= |3= }}

Should be placed directly above or below {{Information}}, {{Artwork}} or other similar template.
Note: some users prefer to include location template(s) into the "Description" field of {{Information}} template in order to group all location information together – objections are in point of graphic design not ideal adjusted for such use. See this and this discussion.

Template parameters

Parameter Description Default Status
1 Latitude Degrees of Latitude. The sign indicates hemisphere: + (North) and - (South). empty required
2 Longitude Degrees of Longitude. The sign indicates hemisphere: + (East) and - (West). empty required
3 attributes Information attributes - used to pass to GeoHack server metadata about the coordinates. Apart from heading, this information is not used by {{Location}} template. Attributes have to be in the format field1:value1_field2:value2_field3:value3, etc. The following fields are supported:
  • region:XX-YYY specifies the political region, used to select appropriate map resources. See here for more info.
  • 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).
  • heading: indicate the direction the camera was pointing at. It is given as degree values 0-360 (clockwise with north as 0) or a compass point abbreviation (up to four letters) as defined in Points of the compass. (Example: heading:NW)
  • scale:N specifies the desired map scale as 1:N. Since most images are at the lowest scale, the parameter should be given only if values different from the default are desired. See here for more info.
  • dim:<width><units> specifies the width of the object in meters or kilometers (example: dim:120m or dim:10km. Since most images are at the lowest scale, the parameter should be given only if values different from the default are desired. See here for more info.
  • class:object is hard-coded value which will be added automatically to all images to tag this location as the ""object location
empty optional
bare "bare=1" will show only field value without field's name ("Object location") empty optional
secondary secondary=1 will tag this set of coordinates as secondary. This template calls {{#coordinates:}} parser function, one of the parameters of which is primary vs. secondary label. Primary coordinates define file's camera location and are the default, but each file can only have single primary location tag. empty optional
prec precision By default the georeference precision is about 0.3 meters or 1/100 of a second on the equator. To show less digits add parameter "prec" with a measurement precisions expressed in meters. For example 40 meter uncertainty would be expressed as "prec=40". At the moment this parameter only affects the display of the coordinates. 0.3 optional

Additional information

The template is intended to be used in the following namespaces: the File namespace

The template is intended to be used by the following user groups: all users

Syntax #2: Degrees/Minutes/Seconds (DMS)

Alternative DMS syntax.

Usage

{{Location |1= |2= |3= |4= |5= |6= |7= |8= |9= }}

Template parameters

Parameter Description Default Status
1 Degrees of Latitude empty required
2 Minutes of Latitude empty required
3 Seconds of Latitude empty required
4 Latitude Direction (N or S) empty required
5 Degrees of Longitude empty required
6 Minutes of Longitude empty required
7 Seconds of Longitude empty required
8 Longitude Direction (W or E) empty required
9 See parameter #3 in the decimal degrees syntax empty optional
bare "bare=1" will show only field value without field's name ("Camera location") empty optional
prec precision By default the georeference precision is about 0.3 meters or 1/100 of a second on the equator. To show less digits add parameter "prec" with a measurement precisions expressed in meters. For example 40 meter uncertainty would be expressed as "prec=40". At the moment this parameter only affects the display of the coordinates. 0.3 optional

Additional information

The template is intended to be used in the following namespaces: all content namespaces

The template is intended to be used by the following user groups: all users

Relies on:
Module:Coordinates

See also

  • Other templates from the family:
  • {{Location}} – used to provide camera location using
  • {{Object location}} – used to provide object location using
  • {{Globe location}} – used to provide object location on other globes, like Moon, Mars, etc.
  • Related templates

All translations at Module:I18n/coordinates

Examples

Syntax #1
Code {{Location|34.02427|-116.15830|region:DE-NI_scale:10000}}
Produces
Camera location 34° 01′ 27.37″ N, 116° 09′ 29.88″ W View this and other nearby images on: OpenStreetMap - Google Maps - Google Earth info
Syntax #2
Code {{Location|34|1|27.37|N|116|9|29.88|W|...}}
Produces
Camera location 34° 01′ 27.37″ N, 116° 09′ 29.88″ W  225° View this and other nearby images on: OpenStreetMap - Google Maps - Google Earth info
Main syntax
Code {{Location|34|1|27.37|N|116|9|29.88|W|...}}
Produces
Camera location 34° 01′ 27.37″ N, 116° 09′ 29.88″ W  225° View this and other nearby images on: OpenStreetMap - Google Maps - Google Earth info