toUtm8 (latlon,
lon=None,
datum=None,
Utm=<class 'pygeodesy.utm.Utm'>,
falsed=True,
strict=True,
zone=None,
**name_cmoff)
|
|
Convert a lat-/longitude point to a UTM coordinate.
- Arguments:
latlon - Latitude (degrees ) or an (ellipsoidal) geodetic
LatLon point.
lon - Longitude (degrees ), required if
latlon is degrees , ignored
otherwise.
datum - Optional datum for this UTM coordinate, overriding
latlon 's datum (Datum,
Ellipsoid, Ellipsoid2 or a_f2Tuple).
Utm - Optional class to return the UTM coordinate (Utm) or
None .
falsed - If True , false both easting and northing
(bool ).
strict - If True , restrict lat to UTM
ranges (bool ).
zone - Optional UTM zone to enforce (int or
str ).
name_cmoff - Optional name=NN (str ) and
DEPRECATED keyword argument cmoff=True to
offset the longitude from the zone's central meridian
(bool ), use falsed instead.
- Returns:
- The UTM coordinate (
Utm ) or if
Utm is None or falsed is
False , a UtmUps8Tuple(zone, hemipole, easting,
northing, band, datum, gamma, scale) where
hemipole is the 'N'|'S' hemisphere.
- Raises:
RangeError - If lat outside the valid UTM bands or if
lat or lon outside the
valid range and rangerrors is True .
TypeError - Invalid datum or latlon not
ellipsoidal.
UTMError - Invalid zone .
ValueError - If lon is missing or latlon
is invalid.
Note:
Implements Karney’s method, using 8-th order Krüger series, giving
results accurate to 5 nm (or better) for distances up to 3,900 Km
from the central meridian.
|