pyiem.models.gridnav module#
Grid Navigation Metadata.
- class pyiem.models.gridnav.CartesianGridNavigation(*, crs='EPSG:4326', left_edge, bottom_edge, top_edge=None, right_edge=None, dx=None, dy=None, nx=None, ny=None)[source]#
Bases:
BaseModelNavigation for cartesian grid with (0,0) in lower left.
The left_edge and bottom_edge are the only required fields. The rest are optional, but you need to have enough information to define the grid, ie provide dx and dy or nx and ny.
- Parameters:
- model_config = {'arbitrary_types_allowed': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- left_edge: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='The left edge of the grid in projection units')]#
- bottom_edge: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='The bottom edge of the grid in projection units')]#
- top_edge: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, description='The top edge of the grid in projection units')]#
- right_edge: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, description='The right edge of the grid in projection units')]#
- dx: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, description='The grid cell width in projection units', metadata=[Gt(gt=0)])]#
- dy: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, description='The grid cell height in projection units', metadata=[Gt(gt=0)])]#
- nx: Annotated[int | None, FieldInfo(annotation=NoneType, required=True, description='The number of grid cells in the x direction', metadata=[Gt(gt=0)])]#
- ny: Annotated[int | None, FieldInfo(annotation=NoneType, required=True, description='The number of grid cells in the y direction', metadata=[Gt(gt=0)])]#
- property affine#
Return the affine transformation.
- property affine_image#
Return the transformation associated with upper left origin.