"Wikitravel has a speed and convenience the books' publishers can only envy." Time Europe

Template:Deg2Dec

From Wikitravel Shared

Jump to: navigation, search
Function

With this template you can convert the geographical position, normally given in degrees, minutes and maybe seconds, into the decimal notation.

Usage
{{Deg2Dec|<degrees>|<minutes>|<seconds>|<direction>}}

Parameters
  • degrees → magnitude of the degrees of the latitude / longitude
  • minutes → magnitude of the minutes of the latitude / longitude
  • seconds → magnitude of the seconds of the latitude / longitude
  • direction → direction, N or S respectively W or E (optional)
Examples
{{Deg2Dec|48|30}} result: 48.5
{{Deg2Dec|48|08|14|N}} result: 48.1372
{{Deg2Dec|33|56|00|S}} result: -33.9333
{{Deg2Dec|74|00|07|W}} result: -74.0019

Caution: The template:Geo only accepts plain numbers and no templates as arguments. So for the moment you can only use this template as a calculation aid.

E.g. you use the template, click on "show preview", cut the calculated coordinates and paste it in the geo-template-call. Do the same with templates that use the geo-template like (no such template on en:, yet!).