我刚刚开始使用GEE Python API。我想从MODIS产品的单个像素中提取NDVI值。当我运行此命令时:
import ee
ee.Authenticate()
ee.Initialize()
t_start = ee.Date("2000-01-01")
t_end = ee.Date("2020-05-25")
AOI = ee.FeatureCollection("users/manuelpopp/xining")
MODIS = ee.ImageCollection("MODIS/006/MOD13Q1") \
.filterDate(t_start, t_end).filterBounds(AOI)
MODIS_ndvi = MODIS.select("NDVI")
scenes = [scene.get("id") for scene in MODIS_ndvi.getInfo().get("features")]
scene = scenes[0]
img = ee.Image(scene)
p = ee.Geometry.Point(101.768548, 36.685077)
ndvit = img.reduceRegion(ee.Reducer.first(), p).get("NDVI").getInfo()
它将ndvit
设置为865。但是,NDVI值不应大于1
我做错了什么?我想对这个值有一个简单的解释
official file specification表示通过以下等式获得真值(“参数”):
parameter=(file data - add_offset)/scale_factor
其中
file data
是文件中的值,并且add_offset
和scale_factor
定义为例如scale_factor
值也在this table中(add_offset
很少使用)进行这些值转换是为了节省磁盘空间(允许将数据保存为16位整数,而不是32或64位浮点)
相关问题 更多 >
编程相关推荐