toWm(latlon,
lon=None,
radius=6378137.0,
Wm=<class 'pygeodesy.webmercator.Wm'>)
|
|
Convert a lat-/longitude point to a WM coordinate.
- Parameters:
latlon - Latitude (degrees) or an (ellipsoidal or spherical) geodetic
LatLon point.
lon - Optional longitude (degrees or None).
radius - Optional earth radius (meter).
Wm - Optional Wm class for the WM coordinate (Wm).
- Returns:
- The WM coordinate (Wm).
- Raises:
ValueError - If lon value is missing, if latlon is not scalar or
latlon is beyond the valid WM range.
Example:
>>> p = LatLon(48.8582, 2.2945)
>>> w = toWm(p)
>>> p = LatLon(13.4125, 103.8667)
>>> w = toWm(p)
|