Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/wri/cities-cif into lulc_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
weiqi-tori committed Jul 4, 2024
2 parents 0485af5 + 6e2f03e commit 7388c3e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion city_metrix/layers/nasa_dem.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import ee
import xee
import xarray as xr
from city_metrix.layers.layer import Layer, get_image_collection

from .layer import Layer, get_image_collection


class NasaDEM(Layer):
def __init__(self, **kwargs):
Expand Down
6 changes: 5 additions & 1 deletion tests/layers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ee

from city_metrix.layers import LandsatCollection2, Albedo, LandSurfaceTemperature, EsaWorldCover, EsaWorldCoverClass, TreeCover, AverageNetBuildingHeight, OpenStreetMap, OpenStreetMapClass, UrbanLandUse, OpenBuildings, TreeCanopyHeight, AlosDSM, SmartSurfaceLULC, OvertureBuildings
from city_metrix.layers import LandsatCollection2, Albedo, LandSurfaceTemperature, EsaWorldCover, EsaWorldCoverClass, TreeCover, AverageNetBuildingHeight, OpenStreetMap, OpenStreetMapClass, UrbanLandUse, OpenBuildings, TreeCanopyHeight, AlosDSM, SmartSurfaceLULC, OvertureBuildings, NasaDEM
from city_metrix.layers.layer import get_image_collection
from .conftest import MockLayer, MockMaskLayer, ZONES, LARGE_ZONES, MockLargeLayer, MockGroupByLayer, \
MockLargeGroupByLayer
Expand Down Expand Up @@ -116,3 +116,7 @@ def test_smart_surface_lulc():
def test_overture_buildings():
count = OvertureBuildings().get_data(SAMPLE_BBOX).count().sum()
assert count

def test_nasa_dem():
mean = NasaDEM().get_data(SAMPLE_BBOX).mean()
assert mean

0 comments on commit 7388c3e

Please sign in to comment.