pydsstools.core.gridinfo.undefined
Undefined grid type implementation.
This module provides the GridInfo class for basic/undefined grid types that don’t use specific projection information.
Classes
|
Metadata for undefined/basic grid type (DSS v7). |
- class pydsstools.core.gridinfo.undefined.GridInfo(**data)[source]
Bases:
GridInfoBaseMetadata for undefined/basic grid type (DSS v7).
This class represents grid data without specific projection information. It contains all basic grid properties: dimensions, cell size, compression, statistics, and optional spatial bounds.
Use this grid type when working with generic raster data, when projection information is not available or not relevant, or when no coordinate transformation is needed.
Examples
Create a basic undefined grid:
>>> from pydsstools.core.gridinfo import GridInfo, GridType, DataType >>> info = GridInfo( ... grid_type=GridType.undefined, ... data_type=DataType.per_aver, ... shape=(100, 150), ... cell_size=1000.0, ... data_units="MM" ... )
Or use the factory function (recommended):
>>> from pydsstools.core.gridinfo import GridInfoCreate >>> info = GridInfoCreate( ... grid_type=GridType.undefined, ... data_type=DataType.per_aver, ... shape=(100, 150), ... cell_size=1000.0, ... data_units="MM" ... )
- grid_type
Type of grid projection. Only
undefinedandundefined_timeare valid. DefaultGridType.undefined_time.- Type:
- data_units
Physical units of the data (e.g., “MM”, “M”, “CFS”). Default
"".- Type:
str
- data_type
Temporal aggregation type (per_aver, per_cum, inst_val, inst_cum, freq). Required.
- Type:
- lower_left_cell
(x, y) indices of the lower-left cell. Default
(0, 0).- Type:
tuple[int, int] or None
- shape
Grid dimensions as (rows, columns). Required.
- Type:
tuple[int, int]
- cell_size
Cell size in projection units (assumed square cells). Required.
- Type:
float
- compression_method
Compression algorithm for data storage. Default
CompressionMethod.zlib.- Type:
- compression_base
Base value for compression scaling. Default
0.0.- Type:
float
- compression_factor
Scale factor for compression. Default
0.0.- Type:
float
- max_val
Maximum data value in grid. Default
0.0.- Type:
float
- min_val
Minimum data value in grid. Default
0.0.- Type:
float
- mean_val
Mean data value in grid. Default
0.0.- Type:
float
- range_vals
Histogram bin edges for data distribution. Default
[].- Type:
list[float]
- range_counts
Count of values in each histogram bin. Default
[].- Type:
list[int]
- min_xy
(x_min, y_min) coordinates of grid extent. Default
None.- Type:
tuple[float, float] or None