eoforeststac.writers.hansen_gfc.HansenGFCWriter#

class eoforeststac.writers.hansen_gfc.HansenGFCWriter(endpoint_url: str, bucket: str, key: str | None = None, secret: str | None = None, profile: str | None = None, region: str = 'eu-central-1', anon: bool = False)[source]#

Writer for Hansen Global Forest Change (GFC) v1.12.

Native input:
  • One VRT per variable (global mosaics)

Output:
  • Single Zarr store with harmonized Hansen variables

Notes

  • Hansen loss encoding (1–24) is converted to calendar year (2001–2024) and stored as loss_year (int16).

  • This avoids implicit conventions and aligns with TMF-style year products.

__init__(endpoint_url: str, bucket: str, key: str | None = None, secret: str | None = None, profile: str | None = None, region: str = 'eu-central-1', anon: bool = False)[source]#

Methods

__init__(endpoint_url, bucket[, key, ...])

apply_fillvalue(ds[, fill_value])

load_dataset(vrt_dir)

Load all Hansen VRT layers into a single Dataset.

load_variable(vrt_path, var_name)

Load a single Hansen VRT lazily.

make_store(zarr_path)

Create an s3fs-backed Zarr store.

process_dataset(ds[, crs, fill_value, ...])

Harmonize CRS, dimensions, chunking, semantics and metadata.

set_crs(ds[, crs])

set_global_metadata(ds, metadata)

write(vrt_dir, output_zarr[, fill_value, ...])

End-to-end Hansen GFC write:

write_to_zarr(ds, zarr_path[, encoding, ...])

Attributes

VARIABLES