根据 google earth engine 中的 shapefile 裁剪
Clipping according to shapefile in google earth engine
我有一个 intertidalArea 的 shapefile,现在我想根据那个 shapefile 剪辑我的图像集。
Map.addLayer(intertidalArea, {}, "Intertidal area")
var image5 = L5.filterDate('1987-01-01','2003-12-31').filterMetadata('CLOUD_COVER', 'less_than', 5)
.filterBounds(geometry)
var image8 = L8.filterDate('2013-01-01','2019-12-31').filterMetadata('CLOUD_COVER', 'less_than', 5)
.filterBounds(geometry)
var image5_set2 = L5.filterDate('2008-01-01','2012-12-31').filterMetadata('CLOUD_COVER', 'less_than', 5)
.filterBounds(geometry)
var collection = image5.merge(image5_set2).merge(image8)
.filter(ee.Filter.eq('WRS_PATH', 150))
.filter(ee.Filter.eq('WRS_ROW', 44));//sort('system:time_start');
//print(collection)
对于ee.ImageCollection,您必须使用包含在函数中的 .clip(yourGeometry),然后映射到图像集合上。 Here will be the link to GEE guide on mapping over image collection.
我有一个 intertidalArea 的 shapefile,现在我想根据那个 shapefile 剪辑我的图像集。
Map.addLayer(intertidalArea, {}, "Intertidal area")
var image5 = L5.filterDate('1987-01-01','2003-12-31').filterMetadata('CLOUD_COVER', 'less_than', 5)
.filterBounds(geometry)
var image8 = L8.filterDate('2013-01-01','2019-12-31').filterMetadata('CLOUD_COVER', 'less_than', 5)
.filterBounds(geometry)
var image5_set2 = L5.filterDate('2008-01-01','2012-12-31').filterMetadata('CLOUD_COVER', 'less_than', 5)
.filterBounds(geometry)
var collection = image5.merge(image5_set2).merge(image8)
.filter(ee.Filter.eq('WRS_PATH', 150))
.filter(ee.Filter.eq('WRS_ROW', 44));//sort('system:time_start');
//print(collection)
对于ee.ImageCollection,您必须使用包含在函数中的 .clip(yourGeometry),然后映射到图像集合上。 Here will be the link to GEE guide on mapping over image collection.