From 364bc21dbbbd64e55fcccbd4d3ca98ce61a9b5c6 Mon Sep 17 00:00:00 2001 From: weiqi-tori Date: Tue, 28 May 2024 19:32:20 +0800 Subject: [PATCH] add ALOS DSM layer --- city_metrix/layers/alos_dsm.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 city_metrix/layers/alos_dsm.py diff --git a/city_metrix/layers/alos_dsm.py b/city_metrix/layers/alos_dsm.py new file mode 100644 index 0000000..95187e6 --- /dev/null +++ b/city_metrix/layers/alos_dsm.py @@ -0,0 +1,21 @@ +import ee +import xee +import xarray as xr + +from .layer import Layer, get_image_collection + + +class AlosDSM(Layer): + def __init__(self, **kwargs): + super().__init__(**kwargs) + + def get_data(self, bbox): + dataset = ee.ImageCollection("JAXA/ALOS/AW3D30/V3_2") + alos_dsm = ee.ImageCollection(dataset + .filterBounds(ee.Geometry.BBox(*bbox)) + .select('DSM') + .mean() + ) + data = get_image_collection(alos_dsm, bbox, 30, "ALOS DSM").DSM + + return data