satellitetools.common.vector
Functions for vector data handling.
@author: Olli Nevalainen (Finnish Meteorological Institute)
Functions
|
Transform area of interest geometry to another coordinate reference system. |
|
Expand bounding box coordinates by amount. |
|
Get coordinate arrays from rasterio profile. |
Module Contents
- satellitetools.common.vector.transform_crs(aoi_geometry: shapely.geometry.Polygon, src_crs: str, dst_crs: str) shapely.geometry.Polygon[source]
Transform area of interest geometry to another coordinate reference system.
- Parameters:
aoi_geometry (Polygon) – Geometry of the area of interest.
src_crs (str) – Source coordinate reference system.
dst_crs (str) – Destination coordinate reference system.
- Returns:
aoi_geometry_transformed
- Return type:
Polygon
- satellitetools.common.vector.expand_bounds(bbox_coordinates: list, amount: float) list[source]
Expand bounding box coordinates by amount.
- Parameters:
bbox_coordinates (list) – Bounding box coordinates [xmin, ymin, xmax, ymax].
amount (float) – Amount to expand the bounding box.
- Returns:
bbox_coordinates – Expanded bounding box coordinates [xmin, ymin, xmax, ymax].
- Return type:
list
- satellitetools.common.vector.coordinate_arrays_from_profile(profile: dict) Tuple[numpy.ndarray, numpy.ndarray][source]
Get coordinate arrays from rasterio profile.
- Parameters:
profile (dict) – Rasterio profile.
- Returns:
xs (np.ndarray) – Array of x coordinates.
ys (np.ndarray) – Array of y coordinates.