Extension:KML Export/deg2dms

From MediaWiki.org
Jump to navigation Jump to search
KML Export Features Installation Quick start How to use Parser functions Special pages Configuration Style syntax

These parser functions convert geographic coordinates in degree notation to degrees-minutes-seconds notation.

Syntax[edit]

{{#lat_deg2dms: value }}
{{#long_deg2dms: value }}

Arguments[edit]

value
Latitude (for lat_deg2dms) or longitude (for long_deg2dms) decimal degree value.

Returns[edit]

lat_deg2dms returns a formated string value between 90° 00′ 00.0″ S and 90° 00′ 00.0″ N.
long_deg2dms returns a formated string value between 180° 00′ 00.0″ W and 180° 00′ 00.0″ E.

Example[edit]

{{#lat_deg2dms:-22.951389}}
{{#long_deg2dms:-43.210833}}

The above wiki markup returns:

22° 57′ 5″ S
43° 12′ 39″ W

See also[edit]