توضیحات الگو[نمایش] [ویرایش] [تاریخچه] [پاکسازی]

The following templates are "subroutines" of {{Coord}}. Separating them out drastically reduces the pre-expand size of {{Coord}}. They shouldn't be invoked directly.

name function
{{Coord/display/inline}} displays coordinates inline
{{Coord/display/inline,title}} displays coordinates inline and above the article
{{Coord/display/title}} displays coordinates above the article (generally to the right of the article's title)
{{Coord/link}} generates microformats and link to GeoHack
{{Coord/input/dec}} reads coordinates in decimal degrees {{coord|12|-12}}
{{Coord/input/d}} reads coordinates in decimal degrees with directional letters {{coord|12|N|12|W}}
{{Coord/input/dm}} reads coordinates in degrees/minutes format {{coord|12|12|N|12|12|W}}
{{Coord/input/dms}} reads coordinates in degrees/minutes/seconds format {{coord|12|12|12|N|12|12|12|W}}
{{Coord/input/ERROR}} generates error message if the inputs do not match any of the above formats
{{Coord/input/error2}} generates error message for range checks and such
{{Coord/negzeropad}} pads a positive number with trailing zeroes until it matches the precision of a negative number
{{Coord/prec dec}} selects a format for converting decimal degrees, based on the precision of the inputs
توضیحات الگو[نمایش] [ویرایش] [تاریخچه] [پاکسازی]

Given a decimal coordinate, two cardinal directions, and precision, render a coordinate in degrees/minutes/seconds.

Usage

{{coord/dec2dms|coord|N|S|precision}}
{{coord/dec2dms|coord|E|W|precision}}

Precision codes:

dDegrees (rounded to integer)
d1Degrees (rounded to 0.1 degrees)
dmDegrees, minutes (rounded to integer)
dm1Degrees, minutes (rounded to 0.1 minutes)
dmsDegrees, minutes, seconds (rounded to integer)
dms1Degrees, minutes, seconds (rounded to 0.1 seconds)

Examples

{{Coord/dec2dms|10.391944|N|S|d}} شمالی‌°10
{{Coord/dec2dms|10.391944|N|S|d1}} شمالی‌10.4°
{{Coord/dec2dms|10.390000|N|S|d}} شمالی‌°10
{{Coord/dec2dms|10.390000|N|S|d1}} شمالی‌10.4°
{{Coord/dec2dms|10.39|N|S|d}} شمالی‌°10
{{Coord/dec2dms|10.39|N|S|d1}} شمالی‌10.4°
{{Coord/dec2dms|-10.391944|N|S|dm}} جنوبی‌10°24′
{{Coord/dec2dms|-10.391944|N|S|dm1}} جنوبی‌10°23.5′
{{Coord/dec2dms|10.391944|E|W|dms}} شرقی‌″۳۱ ′۲۳ °۱۰
{{Coord/dec2dms|10.391944|E|W|dms1}} شرقی‌10°23′31.0″
{{Coord/dec2dms|10|N|S|d}} شمالی‌°10
{{Coord/dec2dms|10|E|W|dm}} شرقی‌10°00′
{{Coord/dec2dms|-10|E|W|dms}} غربی‌″۰۰ ′۰۰ °۱۰
{{Coord/dec2dms|-10|E|W|dms1}} غربی‌10°00′00.0″

Subroutines

Subroutines of الگو:Coord/dec2dms (ویرایش|بحث|تاریخچه|پیوندها|پی‌گیری|سیاهه‌ها):