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#
|
Generate standard EGI column name for a given resolution level. |
|
Validate that a level is within the supported range. |
|
Get the pixel size in meters for a given EGI level. |
|
Find the EGI level closest to a given resolution. |
Module Contents#
- 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