var geometry =
/* color: #0b4a8b */
/* displayProperties: [
{
"type": "rectangle"
}
] */
ee.Geometry.Polygon(
[[[77.07373046875, 38.84382273520147],
[77.07373046875, 35.928922837806645],
[82.47900390625, 35.928922837806645],
[82.47900390625, 38.84382273520147]]], null, false),
sandPer = ee.Image("OpenLandMap/SOL/SOL_SAND-WFRACTION_USDA-3A1A1A_M/v02");
/**
* Using landsat8 data, extract indexes and study certain geographical phenomena
* And because of the lack of necessary data, the script cannot run successfully directly
*
* Saibo Li
* Update 20191119
*
* ------------------------------
* 1、It is recommended to refer to the algorithm in the script.
* The data in the script is test data.
* It is recommended not to use the direct running results for other purposes.
*
* 2、Lack of relevant data(trainpoint* and so on)
*/
Map.setOptions("SATELLITE");
Map.centerObject(geometry,5)
Map.addLayer(geometry, {color: "black",optional:1},'geometry');
//Landsat8 SR数据去云
function rmCloud(image) {
var cloudShadowBitMask = (1 << 3);
var cloudsBitMask = (1 << 5);
var qa = image.select("pixel_qa");
var mask = qa.bitwiseAnd(cloudShadowBitMask).eq(0)
.and(qa.bitwiseAnd(cloudsBitMask).eq(0));
return image.updateMask(mask);
}
//缩放
function scaleImage(image) {
var time_start = image.get("system:time_start");
image = image.multiply(0.0001);
image = image.set("system:time_start", time_start);
return image;
}
//NDVI
function NDVI(image) {
return image.addBands(
image.normalizedDifference(["B5", "B4"])
.rename("NDVI"));
}
var l8Col = ee.ImageCollection("LANDSAT/LC08/C01/T1_SR")
.filterBounds(geometry)
.filterDate("2015-02-01", "2015-9-30")
.filter(ee.Filter.lte("CLOUD_COVER", 50))
.map(rmCloud)
.map(scaleImage)
.map(NDVI);
l8Col = l8Col.qualityMosaic("NDVI").clip(geometry)
Fan, Z.; Li, S.; Fang, H. Explicitly Identifying the Desertification Change in CMREC Area Based on Multisource Remote Data. Remote Sens. 2020, 12, 3170.
评论