crs
Coordinates Reference System (CRS) class
General Attributes and Methods
- class pyTMD.crs[source]
Coordinate Reference System transformations for tide models
- Attributes:
- name: str
Projection name
- transformer: obj
pyproj
transformer for changing coordinate reference system
- convert(i1: ndarray, i2: ndarray, PROJ: str | dict, BF: str, EPSG: int | str = 4326)[source]
Converts points to and from Coordinates Reference Systems (CRS)
- Parameters:
- i1: np.ndarray
Input x-coordinates
- i2: np.ndarray
Input y-coordinates
- PROJ: str or dict
Spatial reference system for coordinate transformations
- BF: str
Direction of transformation
'B'
: backwards'F'
: forwards
- EPSG: int or str, default 4326 (WGS84 Latitude/Longitude)
input (
'F'
) or output ('B'
) coordinate system
- Returns:
- o1: np.ndarray
Output transformed x-coordinates
- o2: np.ndarray
Output transformed y-coordinates
- get(PROJ: str | dict)[source]
Tries to get the coordinate reference system
- Parameters:
- PROJ: str or dict
Spatial reference system for coordinate transformations
- transform(i1: ndarray, i2: ndarray, EPSG: int | str = 4326, **kwargs)[source]
Performs Coordinates Reference System (CRS) transformations
- Parameters:
- i1: np.ndarray
Input x-coordinates
- i2: np.ndarray
Input y-coordinates
- EPSG: int or str, default 4326 (WGS84 Latitude/Longitude)
input (
'F'
) or output ('B'
) coordinate system- **kwargs: dict
Keyword arguments for the transformation
- Returns:
- o1: np.ndarray
Output transformed x-coordinates
- o2: np.ndarray
Output transformed y-coordinates
- from_input(PROJECTION: int | str | dict)[source]
Attempt to retrieve the Coordinate Reference System
- Parameters:
- PROJECTION: int, str or dict
Coordinate Reference System
- property direction
pyproj
direction of the coordinate transform
- property is_geographic
Check if the coordinate reference system is geographic