Land Cover & Vegetation¶
| Class | Key params | Returns | Data source | Description |
|---|---|---|---|---|
EsaWorldCover |
land_cover_class=None, year=2020 |
raster | ESA WorldCover (GEE ESA/WorldCover/v100/v200) |
Global 10m land cover classification, optionally filtered to one class via EsaWorldCoverClass. |
LandCoverGlad |
year=2020 |
raster | GEE projects/glad/GLCLU2020 |
Raw GLAD global land cover/land use classification for a given year. |
LandCoverSimplifiedGlad |
year=2020 |
raster | derived from LandCoverGlad |
Reclassifies raw GLAD codes into a simplified 0–10 class scheme. |
LandCoverHabitatGlad |
year=2020 |
raster | derived from LandCoverSimplifiedGlad |
Binary habitat mask (natural classes 1–6 = habitat). |
LandCoverHabitatChangeGlad |
start_year=2000, end_year=2020 |
raster | derived from LandCoverHabitatGlad (two years) |
Habitat-change code: gained vs. lost habitat between two years. |
NaturalAreas |
year=2020 |
raster | derived from EsaWorldCover |
Binary "natural area" mask reclassified from ESA WorldCover. |
TreeCover |
min_tree_cover=None, max_tree_cover=None |
raster | GEE projects/wri-datalab/TropicalTreeCover + TTC-nontropics |
Merged global tropical/non-tropical percent tree cover. |
TreeCanopyHeight |
height=None, index_aggregation=False, worldpop_version=1 |
raster | GEE Meta CanopyHeight |
Global tree canopy height (meters), optionally aligned to WorldPop grid. |
TreeCanopyHeightCTCM |
height=None |
raster | same Meta canopy-height collection | CTCM-workflow variant of canopy height (buffered then trimmed to AOI). |
TreeCanopyCoverMask |
height=None, percentage=30 |
raster | derived from TreeCanopyHeight |
Binary tree-canopy-cover mask thresholded by % cover. |
NdviSentinel2 |
year=2021, min_threshold=None |
raster | GEE COPERNICUS/S2_HARMONIZED |
NDVI computed from Sentinel-2, optionally binarized at a threshold. |
FractionalVegetationPercent |
min_threshold=None, year=2025, index_aggregation=False, worldpop_version=1 |
raster | GEE Dynamic World + S2 SR + Cloud Score+ | Percent vegetation fraction via NDVI endmember unmixing. |
VegetationWaterMap |
start_date, end_date, greenwater_layer |
raster | Sentinel-2 (cloud-masked) | Annual NDVI/NDWI trend composites; gain/loss vegetation-water change masks. |
OpenUrban |
band='b1' |
raster | GEE projects/wri-datalab/cities/OpenUrban |
High-resolution urban land-use/land-cover classification (buildings, roads, parking, green space) via OpenUrbanClass. |
API¶
city_metrix.layers.esa_world_cover.EsaWorldCover ¶
EsaWorldCover(land_cover_class: EsaWorldCoverClass = None, year=2020, **kwargs)
Bases: Layer
STAC_CATALOG_URI
class-attribute
instance-attribute
¶
STAC_CATALOG_URI = 'https://services.terrascope.be/stac/'
STAC_COLLECTION_ID
class-attribute
instance-attribute
¶
STAC_COLLECTION_ID = 'urn:eop:VITO:ESA_WorldCover_10m_2020_AWS_V1'
STAC_ASSET_ID
class-attribute
instance-attribute
¶
STAC_ASSET_ID = 'ESA_WORLDCOVER_10M_MAP'
Attributes: land_cover_class: Enum value from EsaWorldCoverClass year: year used for data retrieval
get_data ¶
get_data(bbox: GeoExtent, spatial_resolution: int = DEFAULT_SPATIAL_RESOLUTION, resampling_method=None)
city_metrix.layers.esa_world_cover.EsaWorldCoverClass ¶
Bases: Enum
city_metrix.layers.glad_lulc.LandCoverGlad ¶
LandCoverGlad(year=2020, **kwargs)
city_metrix.layers.glad_lulc.LandCoverSimplifiedGlad ¶
LandCoverSimplifiedGlad(year=2020, **kwargs)
city_metrix.layers.glad_lulc.LandCoverHabitatGlad ¶
LandCoverHabitatGlad(year=2020, **kwargs)
city_metrix.layers.glad_lulc.LandCoverHabitatChangeGlad ¶
LandCoverHabitatChangeGlad(start_year=2000, end_year=2020, **kwargs)
Bases: Layer
city_metrix.layers.natural_areas.NaturalAreas ¶
NaturalAreas(year=2020, **kwargs)
city_metrix.layers.tree_cover.TreeCover ¶
TreeCover(min_tree_cover=None, max_tree_cover=None, **kwargs)
Bases: Layer
MAJOR_NAMING_ATTS
class-attribute
instance-attribute
¶
MAJOR_NAMING_ATTS = ['min_tree_cover', 'max_tree_cover']
NO_DATA_VALUE
class-attribute
instance-attribute
¶
NO_DATA_VALUE = 255
Merged tropical and nontropical tree cover from WRI Attributes: min_tree_cover: minimum tree-cover values used for filtering results max_tree_cover: maximum tree-cover values used for filtering results
get_data ¶
get_data(bbox: GeoExtent, spatial_resolution: int = DEFAULT_SPATIAL_RESOLUTION, resampling_method=None)
city_metrix.layers.tree_canopy_height.TreeCanopyHeight ¶
TreeCanopyHeight(height=None, index_aggregation=False, worldpop_version=1, **kwargs)
Bases: Layer
MINOR_NAMING_ATTS
class-attribute
instance-attribute
¶
MINOR_NAMING_ATTS = ['height', 'worldpop_version']
NO_DATA_VALUE
class-attribute
instance-attribute
¶
NO_DATA_VALUE = 0
Attributes: height: minimum tree height used for filtering results
get_data ¶
get_data(bbox: GeoExtent, spatial_resolution: int = DEFAULT_SPATIAL_RESOLUTION, resampling_method=None)
city_metrix.layers.tree_canopy_height_for_ctcm.TreeCanopyHeightCTCM ¶
TreeCanopyHeightCTCM(height=None, **kwargs)
city_metrix.layers.tree_canopy_cover_mask.TreeCanopyCoverMask ¶
TreeCanopyCoverMask(height=None, percentage=30, **kwargs)
Bases: Layer
PROCESSING_TILE_SIDE_M
class-attribute
instance-attribute
¶
PROCESSING_TILE_SIDE_M = 5000
Attributes: spatial_resolution: raster resolution in meters (see https://github.com/stac-extensions/raster) height: minimum tree height used for filtering results
get_data ¶
get_data(bbox: GeoExtent, spatial_resolution: int = DEFAULT_SPATIAL_RESOLUTION, resampling_method=None)
city_metrix.layers.ndvi_sentinel2_gee.NdviSentinel2 ¶
NdviSentinel2(year=2021, min_threshold=None, **kwargs)
Bases: Layer
" NDVI = Sentinel-2 Normalized Difference Vegetation Index return: a rioxarray-format DataArray Author of associated Jupyter notebook: Ted.Wong@wri.org Notebook: https://github.com/wri/cities-cities4forests-indicators/blob/dev-eric/scripts/extract-VegetationCover.ipynb Reference: https://en.wikipedia.org/wiki/Normalized_difference_vegetation_index
city_metrix.layers.fractional_vegetation_percent.FractionalVegetationPercent ¶
FractionalVegetationPercent(min_threshold=None, year=2025, index_aggregation=False, worldpop_version=1, **kwargs)
city_metrix.layers.vegetation_water_map.VegetationWaterMap ¶
VegetationWaterMap(start_date='2016-01-01', end_date='2022-12-31', greenwater_layer='startgreenwaterIndex', **kwargs)
Bases: Layer
MINOR_NAMING_ATTS
class-attribute
instance-attribute
¶
MINOR_NAMING_ATTS = None
Attributes: start_date: starting date for data retrieval end_date: ending date for data retrieval greenwater_layer: select returned layer from 'startgreenwaterIndex'/'endgreenwaterIndex'/'lossgreenwaterSlope'/'gaingreenwaterSlope'
get_data ¶
get_data(bbox: GeoExtent, spatial_resolution: int = DEFAULT_SPATIAL_RESOLUTION, resampling_method=None)
city_metrix.layers.open_urban.OpenUrbanClass ¶
Bases: Enum
BUILDINGS_UNCLASSIFIED_LOW_SLOPE
class-attribute
instance-attribute
¶
BUILDINGS_UNCLASSIFIED_LOW_SLOPE = 601.0
BUILDINGS_UNCLASSIFIED_HIGH_SLOPE
class-attribute
instance-attribute
¶
BUILDINGS_UNCLASSIFIED_HIGH_SLOPE = 602.0
BUILDINGS_RESIDENTIAL_LOW_SLOPE
class-attribute
instance-attribute
¶
BUILDINGS_RESIDENTIAL_LOW_SLOPE = 611.0
BUILDINGS_RESIDENTIAL_HIGH_SLOPE
class-attribute
instance-attribute
¶
BUILDINGS_RESIDENTIAL_HIGH_SLOPE = 612.0
BUILDINGS_NON_RESIDENTIAL_LOW_SLOPE
class-attribute
instance-attribute
¶
BUILDINGS_NON_RESIDENTIAL_LOW_SLOPE = 621.0
BUILDINGS_NON_RESIDENTIAL_HIGH_SLOPE
class-attribute
instance-attribute
¶
BUILDINGS_NON_RESIDENTIAL_HIGH_SLOPE = 622.0