toWm(latlon,
lon=None,
radius=6378137.0,
Wm=<class 'pygeodesy.webmercator.Wm'>,
name='
' )
|
|
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)
or None.
name - Optional name (string).
- Returns:
- The WM coordinate (Wm) or 3-tuple (easting, northing, radius) id
Wm is None.
- Raises:
ValueError - If lon value is missing, if latlon is not scalar, if
latlon is beyond the valid WM range and rangerrors is set to True or if radius is
invalid.
Example:
>>> p = LatLon(48.8582, 2.2945)
>>> w = toWm(p)
>>> p = LatLon(13.4125, 103.8667)
>>> w = toWm(p)
|