imageCollection().filterBounds() 不显示几何输入的结果

imageCollection().filterBounds() is not showing results from geometry input

我正在尝试使用 FeatureCollection 中的 geometry 函数在 ImageCollection 上使用 filterBounds,但没有出现任何变化。我不明白为什么在我将几何体传递到 filterBounds.

时它不起作用
import geemap
import ee

Map = geemap.Map()
Map

# retreives geometry for colorado
co = ee.FeatureCollection('TIGER/2018/States').filter("NAME == 'Colorado'").geometry()

# clips image to colorado geometry
lf_veg_dataset = ee.ImageCollection('LANDFIRE/Vegetation/EVT/v1_4_0').filterBounds(co);

# selects dataset to be mapped
lf_veg = lf_veg_dataset.select('EVT')

# sets image variables
lf_veg_vis = {'min': 3001, 'max': 3999, 'opacity': 1.0}

# adds image layers to map
Map.addLayer(lf_veg, lf_veg_vis, 'Veg')

filterBounds() 传递输入集合中具有与几何相交的几何元素的元素 - 另请参见此处:https://gis.stackexchange.com/questions/247955/clipping-vs-filtering-images-with-a-polygon-google-earth-engine。在您的情况下,这意味着过滤器 returns 是一个涵盖除 AK 和 HI 之外的所有状态的 IC。您只需要将该输出剪辑到您感兴趣的区域:

import geemap
import ee

Map = geemap.Map()

# retreives geometry for colorado
co = ee.FeatureCollection('TIGER/2018/States').filterMetadata('NAME', 'equals', 'Colorado').geometry()

# clips image to colorado geometry
lf_veg_dataset = ee.ImageCollection('LANDFIRE/Vegetation/EVT/v1_4_0').filterBounds(co)

# selects dataset to be mapped
lf_veg = lf_veg_dataset.select('EVT')

# Clip to bounds of geometry
lf_veg_img = lf_veg.map(lambda image: image.clip(co))

# sets image variables
lf_veg_vis = {'min': 3001, 'max': 3999, 'opacity': 1.0}

# adds image layers to map
Map.addLayer(lf_veg_img, lf_veg_vis, 'Veg')

Map