Various utility functions.
|
degrees(x)
Convert angle x from radians to degrees. |
|
|
|
radians(x)
Convert angle x from degrees to radians. |
|
|
|
acos1(x)
Return math.acos(max(-1, min(1, x))) . |
|
|
|
acre2ha(acres)
Convert acres to hectare. |
|
|
|
acre2m2(acres)
Convert acres to square meter. |
|
|
|
asin1(x)
Return math.asin(max(-1, min(1, x))) . |
|
|
|
atan1(y,
x=1.0)
Return atan(y / x) angle in
radians [-PI/2..+PI/2] using
atan2 for consistency and to avoid
ZeroDivisionError . |
|
|
|
atan1d(y,
x=1.0)
Return atan(y / x) angle in
degrees [-90..+90] using
atan2d for consistency and to avoid
ZeroDivisionError . |
|
|
|
atan2b(y,
x)
Return atan2(y, x) in degrees [0..+360]. |
|
|
|
atan2d(y,
x,
reverse=False)
Return atan2(y, x) in degrees [-180..+180], optionally reversed (by 180
degrees for azimuth s). |
|
|
|
chain2m(chains)
Convert UK chains to meter. |
|
|
|
circle4(earth,
lat)
Get the equatorial or a parallel circle of latitude. |
|
|
|
cot(rad,
**error_kwds)
Return the cotangent of an angle in
radians . |
|
|
|
cot_(*rads,
**error_kwds)
Return the cotangent of angle(s) in
radiansresection . |
|
|
|
cotd(deg,
**error_kwds)
Return the cotangent of an angle in
degrees . |
|
|
|
cotd_(*degs,
**error_kwds)
Return the cotangent of angle(s) in
degrees . |
|
|
|
degrees90(rad)
Convert radians to degrees and wrap [-90..+90). |
|
|
|
degrees180(rad)
Convert radians to degrees and wrap [-180..+180). |
|
|
|
degrees360(rad)
Convert radians to degrees and wrap [0..+360). |
|
|
|
|
|
degrees2m(deg,
radius=6371008.771415,
lat=0)
Convert an angle to a distance along the equator or along the
parallel at an other (geodetic) latitude. |
|
|
|
fathom2m(fathoms)
Convert Imperial fathom to meter. |
|
|
|
ft2m(feet,
usurvey=False,
pied=False,
fuss=False)
Convert International, US Survey, French or
German feet to meter . |
|
|
|
furlong2m(furlongs)
Convert a furlong to meter. |
|
|
|
grades(rad)
Convert radians to grades (aka gons or
gradians). |
|
|
|
grades400(rad)
Convert radians to grades (aka gons or gradians)
and wrap [0..+400). |
|
|
|
|
|
|
|
km2m(km)
Convert kilo meter to meter (m). |
|
|
|
m2chain(meter)
Convert meter to UK chains. |
|
|
|
m2degrees(distance,
radius=6371008.771415,
lat=0)
Convert a distance to an angle along the equator or along the
parallel at an other (geodetic) latitude. |
|
|
|
m2fathom(meter)
Convert meter to Imperial fathoms. |
|
|
|
m2ft(meter,
usurvey=False,
pied=False,
fuss=False)
Convert meter to International, US Survey,
French or or German feet (ft ). |
|
|
|
|
|
m2km(meter)
Convert meter to kilo meter (Km). |
|
|
|
m2NM(meter)
Convert meter to nautical miles (NM). |
|
|
|
m2radians(distance,
radius=6371008.771415,
lat=0)
Convert a distance to an angle along the equator or along the
parallel at an other (geodetic) latitude. |
|
|
|
m2SM(meter)
Convert meter to statute miles (SM). |
|
|
|
|
|
m2yard(meter)
Convert meter to UK yards. |
|
|
|
NM2m(nm)
Convert nautical miles to meter (m). |
|
|
|
radians2m(rad,
radius=6371008.771415,
lat=0)
Convert an angle to a distance along the equator or along the
parallel at an other (geodetic) latitude. |
|
|
|
radiansPI(deg)
Convert and wrap degrees to radians [-PI..+PI]. |
|
|
|
radiansPI2(deg)
Convert and wrap degrees to radians [0..+2PI). |
|
|
|
radiansPI_2(deg)
Convert and wrap degrees to radians [-3PI/2..+PI/2]. |
|
|
|
SinCos2(x)
Get sin and cos of typed angle. |
|
|
|
sincos2(rad)
Return the sine and cosine of an angle in
radians . |
|
|
|
sincos2_(*rads)
Return the sine and cosine of angle(s) in
radians . |
|
|
|
sincos2d(deg,
**adeg)
Return the sine and cosine of an angle in
degrees . |
|
|
|
sincos2d_(*degs)
Return the sine and cosine of angle(s) in
degrees . |
|
|
|
sincostan3(rad)
Return the sine , cosine and
tangent of an angle in radians . |
|
|
|
SM2m(sm)
Convert statute miles to meter (m). |
|
|
|
tan_2(rad,
**semi)
Compute the tangent of half angle. |
|
|
|
tand(deg,
**error_kwds)
Return the tangent of an angle in degrees . |
|
|
|
tand_(*degs,
**error_kwds)
Return the tangent of angle(s) in degrees . |
|
|
|
tanPI_2_2(rad)
Compute the tangent of half angle, 90 degrees rotated. |
|
|
|
|
|
truncate(x,
ndigits=None)
Truncate to the given number of digits. |
|
|
|
unroll180(lon1,
lon2,
wrap=True)
Unroll longitudinal delta and wrap longitude in degrees. |
|
|
|
unrollPI(rad1,
rad2,
wrap=True)
Unroll longitudinal delta and wrap longitude in radians. |
|
|
|
wrap90(deg)
Wrap degrees to [-90..+90]. |
|
|
|
wrap180(deg)
Wrap degrees to [-180..+180]. |
|
|
|
wrap360(deg)
Wrap degrees to [0..+360). |
|
|
|
wrapPI(rad)
Wrap radians to [-PI..+PI]. |
|
|
|
wrapPI2(rad)
Wrap radians to [0..+2PI). |
|
|
|
wrapPI_2(rad)
Wrap radians to [-PI/2..+PI/2]. |
|
|
|
wrap_normal(*normal)
Define the operation for the keyword argument
wrap=True , across pygeodesy: wrap, normalize or
no-op. |
|
|
|
yard2m(yards)
Convert UK yards to meter. |
|
|