Functions to parse and format bearing, compass, lat- and longitudes in
various forms of degrees, minutes and seconds.
|
|
bearingDMS(bearing,
form='d',
prec=None,
sep='')
Convert bearing to a string. |
|
|
|
|
clipDMS(deg,
limit)
Clip a lat- or longitude to the given range. |
|
|
|
|
compassDMS(bearing,
form='d',
prec=None,
sep='')
Convert bearing to a string suffixed with compass point. |
|
|
|
|
compassPoint(bearing,
prec=3)
Convert bearing to a compass point. |
|
|
|
|
degDMS(deg,
prec=6,
s_D='°',
s_M='\xe2\x80\xb2',
s_S='″',
neg='-',
pos='')
Convert degrees to a string in degrees, minutes or
seconds. |
|
|
|
|
latDMS(deg,
form='dms',
prec=2,
sep='')
Convert latitude to a string, optionally suffixed with N or S. |
|
|
|
|
lonDMS(deg,
form='dms',
prec=2,
sep='')
Convert longitude to a string, optionally suffixed with E or W. |
|
|
|
|
normDMS(strDMS,
norm='')
Normalize all degree ˚, minute ' and second " symbols in a
string to the default symbols °, ′ and ″. |
|
|
|
|
parse3llh(strll,
height=0,
sep=',',
clipLat=90,
clipLon=180)
Parse a string representing lat-, longitude and height point. |
|
|
|
|
parseDMS(strDMS,
suffix='NSEW',
sep='',
clip=0)
Parse a string representing deg°min′sec″ to degrees. |
|
|
|
|
parseDMS2(strLat,
strLon,
sep='',
clipLat=90,
clipLon=180)
Parse lat- and longitude representions. |
|
|
|
|
precision(form,
prec=None)
Set the default precison for a given F_ form. |
|
|
|
|
toDMS(deg,
form='dms',
prec=2,
sep='',
ddd=2,
neg='-',
pos='')
Convert signed degrees to string, without suffix. |
|
|
|
|
__all__ = _ALL_LAZY.dms
|
|
|
F_D = 'd'
Format degrees as unsigned "deg°" plus suffix
(str).
|
|
|
F_DM = 'dm'
Format degrees as unsigned "deg°min′" plus suffix
(str).
|
|
|
F_DMS = 'dms'
Format degrees as unsigned "deg°min′sec″" plus suffix
(str).
|
|
|
F_DEG = 'deg'
Format degrees as unsigned "[D]DD" plus suffix without
symbol (str).
|
|
|
F_MIN = 'min'
Format degrees as unsigned "[D]DDMM" plus suffix without
symbols (str).
|
|
|
F_SEC = 'sec'
Format degrees as unsigned "[D]DDMMSS" plus suffix without
symbols (str).
|
|
|
F_RAD = 'rad'
Convert degrees to radians and format as unsigned "RR" plus
suffix (str).
|
|
|
F_D_ = '-d'
Format degrees as signed "-/deg°" without suffix
(str).
|
|
|
F_DM_ = '-dm'
Format degrees as signed "-/deg°min′" without suffix
(str).
|
|
|
F_DMS_ = '-dms'
Format degrees as signed "-/deg°min′sec″" without suffix
(str).
|
|
|
F_DEG_ = '-deg'
Format degrees as signed "-/[D]DD" without suffix and
symbol (str).
|
|
|
F_MIN_ = '-min'
Format degrees as signed "-/[D]DDMM" without suffix and
symbols (str).
|
|
|
F_SEC_ = '-sec'
Format degrees as signed "-/[D]DDMMSS" without suffix and
symbols (str).
|
|
|
F_RAD_ = '-rad'
Convert degrees to radians and format as signed "-/RR"
without suffix (str).
|
|
|
F_D__ = '+d'
Format degrees as signed "-/+deg°" without suffix
(str).
|
|
|
F_DM__ = '+dm'
Format degrees as signed "-/+deg°min′" without suffix
(str).
|
|
|
F_DMS__ = '+dms'
Format degrees as signed "-/+deg°min′sec″" without suffix
(str).
|
|
|
F_DEG__ = '+deg'
Format degrees as signed "-/+[D]DD" without suffix and
symbol (str).
|
|
|
F_MIN__ = '+min'
Format degrees as signed "-/+[D]DDMM" without suffix and
symbols (str).
|
|
|
F_SEC__ = '+sec'
Format degrees as signed "-/+[D]DDMMSS" without suffix and
symbols (str).
|
|
|
F_RAD__ = '+rad'
Convert degrees to radians and format as signed "-/+RR"
without suffix (str).
|
|
|
S_DEG = '°'
Degrees "°" symbol (str).
|
|
|
S_MIN = '\xe2\x80\xb2'
Minutes "′" symbol (str).
|
|
|
S_SEC = '″'
Seconds "″" symbol (str).
|
|
|
S_RAD = ''
Radians symbol "" (str).
|
|
|
S_SEP = ''
Separator between deg, min and sec "" (str).
|