Skip to content

Commit

Permalink
add ALOS DSM layer
Browse files Browse the repository at this point in the history
  • Loading branch information
weiqi-tori authored and chrowe committed May 29, 2024
1 parent 09f91dc commit 364bc21
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions city_metrix/layers/alos_dsm.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 364bc21

Please sign in to comment.