eoio.readers.flex.grid module#
eoio.readers.flex.grid#
Product grid of a FLEX product, derived from the global GeoTransform and spatial_ref
attributes (the product has no x/y coordinate variables). The CRS differs between products
(the UTM zone follows the scene), so it is always read from the file.
Classes#
|
North-up regular grid in a projected CRS. |
- class eoio.readers.flex.grid.FlexGrid(x0: float, y0: float, dx: float, dy: float, nx: int, ny: int, crs: str)[source]#
Bases:
objectNorth-up regular grid in a projected CRS.
- Parameters:
x0 – x coordinate of the upper-left corner of the upper-left pixel.
y0 – y coordinate of the upper-left corner of the upper-left pixel.
dx – pixel width (positive).
dy – pixel height (positive, y decreases with row index).
nx – number of columns.
ny – number of rows.
crs – CRS as a string, e.g.
"EPSG:32631".
- property bounds: Tuple[float, float, float, float]#
Outer
(xmin, ymin, xmax, ymax)bounds in the grid CRS.
- crs: str#
- dx: float#
- dy: float#
- property epsg: int#
EPSG code of the grid CRS.
- classmethod from_attrs(attrs: Mapping[str, Any], nx: int, ny: int) FlexGrid[source]#
Build from the global attributes of a FLEX product.
- Parameters:
attrs – global attributes (must contain
GeoTransformandspatial_ref).nx – size of the easting dimension.
ny – size of the northing dimension.
- Raises:
ValueError – if the grid attributes are missing or the grid is rotated/south-up.
- nx: int#
- ny: int#
- property x: ndarray#
Pixel-centre easting coordinates.
- x0: float#
- property y: ndarray#
Pixel-centre northing coordinates (decreasing).
- y0: float#