我想复制以下图像,像素级告诉(看看图例)一个ee.ImageCollection中有多少图像可用。
https://i.stack.imgur.com/BgoMR.png 1
我感谢您的帮助,提前!
参考文献:1 Masoud Mahdianpari、Bahram Salehi、Fariba Mohammadimanesh、Brian Brisco、Saeid Homayouni、Eric Gill、Evan R. DeLancey和Laura Bourgeau-Chavez (2020年):使用Sentinel-1和Sentinel-2在谷歌地球引擎云计算平台、加拿大遥感杂志、46:1、15-33、DOI: 10.1080/07038992.2019.1711366输入图像描述
发布于 2022-08-16 16:40:47
如果使用geemap package,则可以使用geemap.image_count函数和Map.add_colorbar方法添加色条。如果使用JavaScript代码编辑器,您可以使用下面的代码,这些代码是从geemap 存储库派生和修改的,您可以检查这以添加一个色条:
// Acquire Sentinel-2 Image Collection
var collection = ee.ImageCollection('COPERNICUS/S2_SR_HARMONIZED')
// Get one band's name
var band = collection.first().bandNames().get(0)
// Generate desired image where each pixel value represents the number of Images in the Image Collection
var image = collection.filterBounds(geometry)
.filterDate('2017-01-01', '2020-04-15')
.filter(ee.Filter.listContains("system:band_names", band))
.select([band])
.reduce(ee.Reducer.count())
.clip(geometry)
var vis = {"min":0,"max":900,"palette":["00FFFF","0000FF"]}
Map.addLayer(image, vis, 'NDWI')https://stackoverflow.com/questions/71139267
复制相似问题