wradlib.georef.projection.reproject#
- wradlib.georef.projection.reproject(*args, **kwargs)[source]#
- wradlib.georef.projection.reproject(obj: Dataset, **kwargs)
- wradlib.georef.projection.reproject(obj: DataArray, **kwargs)
Transform coordinates from a source projection to a target projection.
Call signatures:
reproject(C, **kwargs) reproject(X, Y, **kwargs) reproject(X, Y, Z, **kwargs)
C is the np array of source coordinates. X, Y and Z specify arrays of x, y, and z coordinate values
- Parameters:
C (
numpy.ndarray) – Array of shape (…,2) or (…,3) with coordinates (x,y) or (x,y,z) respectivelyX (
numpy.ndarray) – Array of x coordinatesY (
numpy.ndarray) – Array of y coordinatesZ (
numpy.ndarray) – Array of z coordinates
- Keyword Arguments:
src_crs –
Coordinate Reference System (CRS) of the coordinates. Can be one of:
A
pyproj.crs.CoordinateSysteminstanceA
cartopy.crs.CRSinstanceA
osgeo.osr.SpatialReferenceinstanceA type accepted by
pyproj.CRS.from_user_input(e.g., EPSG code, PROJ string, dictionary, WKT, or any object with a to_wkt() method)
Defaults to EPSG(4326).
trg_crs –
Coordinate Reference System (CRS) of the coordinates. Can be one of:
A
pyproj.crs.CoordinateSysteminstanceA
cartopy.crs.CRSinstanceA
osgeo.osr.SpatialReferenceinstanceA type accepted by
pyproj.CRS.from_user_input(e.g., EPSG code, PROJ string, dictionary, WKT, or any object with a to_wkt() method)
Defaults to EPSG(4326).
area_of_interest (
tuple) – floats (WestLongitudeDeg, SouthLatitudeDeg, EastLongitudeDeg, NorthLatitudeDeg), defaults to None (no area of interest)
- Returns:
trans (
numpy.ndarray) – Array of reprojected coordinates x,y (…,2) or x,y,z (…,3) depending on input array.X, Y (
numpy.ndarray) – Arrays of reprojected x,y coordinates, shape depending on input arrayX, Y, Z (
numpy.ndarray) – Arrays of reprojected x,y,z coordinates, shape depending on input array
Examples