wradlib.georef.projection.get_earth_radius#
- wradlib.georef.projection.get_earth_radius(latitude, *, crs=None)[source]#
- wradlib.georef.projection.get_earth_radius(obj: DataArray, *, crs=None)
- wradlib.georef.projection.get_earth_radius(obj: Dataset, *, crs=None)
Get the radius of the Earth (in m) for a given Spheroid model (crs) at a given position.
\[R^2 = \frac{a^4 \cos(f)^2 + b^4 \sin(f)^2} {a^2 \cos(f)^2 + b^2 \sin(f)^2}\]- Parameters:
latitude (
float) – geodetic latitude in degrees- Keyword Arguments:
crs –
Coordinate Reference System (CRS) of the coordinates. Must be provided and can be one of:
A
pyproj.crs.CoordinateSysteminstanceA
cartopy.crs.CRSinstanceA
osgeo.osr.SpatialReferenceinstanceA type accepted by
pyproj.crs.CRS.from_user_input(e.g., EPSG code, PROJ string, dictionary, WKT, or any object with a to_wkt() method)
Defaults to EPSG(4326).
- Returns:
radius (
float) – earth radius in meter