For faster navigation, this Iframe is preloading the Wikiwand page for Predloga:Decdeg.

Predloga:Decdeg

Dokumentacija za predlogo[poglej] [uredi] [zgodovina] [osveži]

This helper template provides a way to convert geographic coordinates from degree, minute, second format to decimal degrees. It is intended for use in building infobox templates.

Usage

[uredi kodo]

The template can be used with named or unnamed parameters as shown.

Parameter Description
((decdeg
| deg = 
| min =
| sec = 
| hem = 
| rnd =
))
 
Degrees
Minutes
Seconds
Hemisphere
Round
 

Input degrees can be signed in which case the hemisphere is not required. A negative value implies a value in the western or southern hemisphere. Minutes and seconds need not be specified. If no degrees are specified then a value of zero is assumed. This template does not attempt to trap invalid values and results in this case might be undefined.

The decimal precision of the result is determined by the value assigned rnd, which defaults to 7.

Currently this template does not attempt to trap invalid values.

Examples

[uredi kodo]
((decdeg|deg=37|min=51|sec=00|hem=N)) → 37.85
((decdeg|deg=119|min=34|sec=04|hem=W)) → -119.5677778

When using unnamed parameters, the hemisphere must be the fourth parameter:

((decdeg|37|51||N)) → 37.85
((decdeg|119|34||W)) → -119.5666667

Input can be signed or unsigned decimal degrees:

((decdeg|37.85|||N)) → 37.85
((decdeg|119.5666667|||W)) → -119.5666667
((decdeg|37.85)) → 37.85
((decdeg|-119.5666667)) → -119.5666667

When using rounding, the factor must be the fifth parameter:

((decdeg|37.85||||1)) → 37.9
((decdeg|-119.5666667||||1)) → -119.6

If a value is undefined then zero is assumed:

((decdeg||51||N)) → 0.85
((decdeg||34||W)) → -0.5666667

Negative zero values are accommodated:

((decdeg|0|51)) → 0.85
((decdeg|-0|34)) → -0.5666667

See also

[uredi kodo]

</noinclude

{{bottomLinkPreText}} {{bottomLinkText}}
Predloga:Decdeg
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?