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. |
|
|
|
|
latDMS(deg,
form='dms',
prec=2,
sep='')
Convert latitude to a string suffixed with N or S. |
|
|
|
|
lonDMS(deg,
form='dms',
prec=2,
sep='')
Convert longitude to a string 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. |
|
|
|
|
rangerrors(raiser=None)
Gert/set raising of range errors. |
|
|
|
|
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 deg° (str).
|
|
|
F_DM = 'dm'
Format degrees as deg°min′ (str).
|
|
|
F_DMS = 'dms'
Format degrees as deg°min′sec″ (str).
|
|
|
F_DEG = 'deg'
Format degrees as [D]DD without symbol (str).
|
|
|
F_MIN = 'min'
Format degrees as [D]DDMM without symbols (str).
|
|
|
F_SEC = 'sec'
Format degrees as [D]DDMMSS without symbols (str).
|
|
|
F_RAD = 'rad'
Convert degrees to radians and format as RR.r (str).
|
|
|
S_DEG = '\xc2\xb0'
Degrees "°" symbol (str).
|
|
|
S_MIN = '\xe2\x80\xb2'
Minutes "′" symbol (str).
|
|
|
S_SEC = '\xe2\x80\xb3'
Seconds "″" symbol (str).
|
|
|
S_RAD = ''
Radians symbol "" (str).
|
|
|
S_SEP = ''
Separator between deg, min and sec "" (str).
|