GEE入门 | 重采样
函数
Image.reproject(crs, crsTransform, scale)
输出为image
参数:
Argument | Type | Details |
---|---|---|
this: image |
Image | The Image to reproject. |
crs |
Projection | The CRS to project the image to. |
crsTransform |
List, default: null | The list of CRS transform values. This is a row-major ordering of the 3x2 transform matrix. This option is mutually exclusive with the scale option, and replaces any transform already on the projection. |
scale |
Float, default: null | If scale is specified, then the projection is scaled by dividing the specified scale value by the nominal size of a meter in the specified projection. If scale is not specified, then the scale of the given projection will be used. |
例子
这里将Sentinel-2影像重采样到100m作为例子。
P.S. 一般引入GEE数据库显示的分辨率一开始都是111319.490……
javascript
function maskS2clouds(image) {
var qa = image.select('QA60');
// Bits 10 and 11 are clouds and cirrus, respectively.
var cloudBitMask = 1 << 10;
var cirrusBitMask = 1 << 11;
// Both flags should be set to zero, indicating clear conditions.
var mask = qa.bitwiseAnd(cloudBitMask).eq(0).and(qa.bitwiseAnd(cirrusBitMask).eq(0));
return