gedih3.egi.config#

EGI (EASE Grid Index) Configuration Module

This module defines constants and configuration for the EASE-Grid 2.0 (EPSG:6933) spatial indexing system used for GEDI L4B-compatible square pixel outputs.

The EGI system provides: - 12 resolution levels (1m to 160km) - Perfect alignment with GEDI L4B products at level 6 (~1km) - Native raster output without resampling artifacts - Hash-based coordinate encoding for efficient spatial indexing

Reference: - EASE-Grid 2.0: https://nsidc.org/ease/ease-grid-projection-gt - EPSG:6933: WGS 84 / NSIDC EASE-Grid 2.0 Global

Attributes#

Functions#

egi_col_name(→ str)

Generate standard EGI column name for a given resolution level.

validate_level(→ None)

Validate that a level is within the supported range.

get_resolution(→ float)

Get the pixel size in meters for a given EGI level.

get_level_from_resolution(→ int)

Find the EGI level closest to a given resolution.

Module Contents#

gedih3.egi.config.UINT_MAX: int = 18446744073709551615#
gedih3.egi.config.INT_MAX: int = 9223372036854775807#
gedih3.egi.config.LIMITS: Dict[str, float]#
gedih3.egi.config.EGI_RES6: float = 1000.89502334956#
gedih3.egi.config.RESOLUTIONS: Dict[int, float]#
gedih3.egi.config.OUTER_RES: float#
gedih3.egi.config.OUTER_LEVEL: int#
gedih3.egi.config.EGI_CRS: int = 6933#
gedih3.egi.config.EGI_CRS_STRING: str = 'EPSG:6933'#
gedih3.egi.config.egi_col_name(level: int) str[source]#

Generate standard EGI column name for a given resolution level.

Parameters:
levelint

EGI resolution level (1-12)

Returns:
str

Column name in format ‘egi{level:02d}’ (e.g., ‘egi01’, ‘egi12’)

gedih3.egi.config.validate_level(level: int) None[source]#

Validate that a level is within the supported range.

Parameters:
levelint

EGI resolution level to validate

Raises:
ValueError

If level is not between 1 and 12

gedih3.egi.config.get_resolution(level: int) float[source]#

Get the pixel size in meters for a given EGI level.

Parameters:
levelint

EGI resolution level (1-12)

Returns:
float

Pixel size in meters

Raises:
ValueError

If level is not between 1 and 12

gedih3.egi.config.get_level_from_resolution(resolution: float, tolerance: float = 0.01) int[source]#

Find the EGI level closest to a given resolution.

Parameters:
resolutionfloat

Target resolution in meters

tolerancefloat

Relative tolerance for matching (default 1%)

Returns:
int

EGI level with closest matching resolution

Raises:
ValueError

If no level matches within tolerance