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. |
|
|
|
|
compassAngle(lat0,
lon0,
lat1,
lon1)
Return the angle from North for the direction vector (lon1 - lon0, lat1 - lat0) between two points. |
|
|
|
|
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. |
|
|
|
|
F_D = 'd'
Format degrees as deg° (string).
|
|
|
F_DM = 'dm'
Format degrees as deg°min′ (string).
|
|
|
F_DMS = 'dms'
Format degrees as deg°min′sec″ (string).
|
|
|
F_DEG = 'deg'
Format degrees as [D]DD without symbol (string).
|
|
|
F_MIN = 'min'
Format degrees as [D]DDMM without symbols (string).
|
|
|
F_SEC = 'sec'
Format degrees as [D]DDMMSS without symbols (string).
|
|
|
F_RAD = 'rad'
Convert degrees to radians and format as RR.r (string).
|
|
|
S_DEG = '\xc2\xb0'
Degrees ° symbol (string).
|
|
|
S_MIN = '\xe2\x80\xb2'
Minutes ′ symbol (string).
|
|
|
S_SEC = '\xe2\x80\xb3'
Seconds ″ symbol (string).
|
|
|
S_RAD = ''
Radians symbol (string).
|
|
|
S_SEP = ''
Separator between deg, min and sec (string).
|