constants¶
Constant values and string enums.
Model ¶
Bases: StrEnum
bbox
property
¶
Gets the bounding box for the model.
Returns:
| Type | Description |
|---|---|
tuple[float, float, float, float]
|
A tuple of (min_lon, min_lat, max_lon, max_lat). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the model is unexpected. |
extent
property
¶
Gets the STAC extent for the model.
Returns:
| Type | Description |
|---|---|
Extent
|
A STAC Extent object with spatial and temporal extents. |
geometry
property
¶
Gets the GeoJSON geometry for the model coverage area.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A GeoJSON geometry dictionary. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the model is unexpected. |
get_collection_id ¶
Generates the collection ID for a model and theme combination.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
theme
|
Theme
|
The theme to combine with this model. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The collection ID string. |
Source code in src/stactools/met_office_deterministic/constants.py
Theme ¶
Bases: StrEnum
from_parameter
classmethod
¶
Determines the theme from a parameter name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameter
|
str
|
The parameter name to classify. |
required |
Returns:
| Type | Description |
|---|---|
Theme
|
The Theme corresponding to the parameter. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the parameter is unknown. |
Source code in src/stactools/met_office_deterministic/constants.py
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 | |