我需要在两个MODIS集合中应用一个filter函数来按日期查找常见图像,但我不知道如何在pythonapi中这样做。我有一个错误: EEException:无法编码object:set(['system:time\u start'])
GEE function:
var filterTimeEq = ee.Filter.equals({
leftField: 'system:time_start',
rightField: 'system:time_start'
});
GEE function in Python API:
leftField = 'system:time_start'
rightField = 'system:time_start'
filterTimeEq = ee.Filter.equals({leftField, rightField})
Python API Code:
terra = ee.ImageCollection('MODIS/006/MOD10A1').filterBounds(pt).select('NDSI_Snow_Cover').sort('system:time_start').filterDate('2016-01-01', '2017-12-31')
aqua = ee.ImageCollection('MODIS/006/MYD10A1').filterBounds(pt).select('NDSI_Snow_Cover').sort('system:time_start').filterDate('2016-01-01', '2017-12-31')
innerJoin = ee.Join.inner()
innerJoinedCollection = innerJoin.apply(terra, aqua, filterTimeEq)
joinedCollection = innerJoinedCollection.map(concatBands)
yearlyCollection = joinedCollection.map(maxVal)
start = ee.Date(yearlyCollection.first().get('system:time_start'))
maxCollection=ee.ImageCollection(yearlyCollection)
SnowCount = maxCollection.map(snowMask)
假设concatbands函数是以下定义:
在python中,filtertimeEq应该写为:
相关问题 更多 >
编程相关推荐