赞
踩
L8B3_1323s3_med_luangwa00
ID: SPB5VCOWUJU2TUPI4PXXSKMX
Phase: Failed
Runtime: 27s (started 2024-01-28 15:50:11 +0800)
Attempted 1 time
Error: Export too large: specified 375255165 pixels (max: 100000000). Specify higher maxPixels value if you intend to export a large area. (Error code: 3)
- // TERRAIN CORRECTION
- var scale = 300;
- var dem = ee.Image("USGS/SRTMGL1_003");
-
- var terrainCorrection = function(collection) {
-
- collection = collection.map(illuminationCondition);
- collection = collection.map(illuminationCorrection);
-
- return(collection);
-
- // Function to calculate illumination condition (IC). Function by Patrick Burns and Matt Macander
- function illuminationCondition(img){
-
- // Extract image metadata about solar position
- var SZ_rad = ee.Image.constant(ee.Number(img.get('SUN_ELEVATION'))).multiply(-1).add(90).multiply(3.14159265359).divide(180).clip(img.geometry().buffer(10000));
- var SA_rad = ee.Image.constant(ee.Number(img.get('SUN_AZIMUTH')).multiply(3.14159265359).divide(180)).clip(img.geometry().buffer(10000));
- // Creat terrain layers
- var slp = ee.Terrain.slope(dem).clip(img.geometry().buffer(10000));
- var slp_rad = ee.Terrain.slope(dem).multiply(3.14159265359).divide(180).clip(img.geometry().buffer(10000));
- var asp_rad = ee.Terrain.aspect(dem).multiply(3.14159265359).divide(180).clip(img.geometry().buffer(10000));
-
- // Calculate the Illumination Condition (IC)
- // slope part of the illumination condition
- var cosZ = SZ_rad.cos();
- var cosS = slp_rad.cos();
- var slope_illumination = cosS.expression("cosZ * cosS",
- {'cosZ': cosZ,
- 'cosS': cosS.select('slope')});
- // aspect part of the illumination condition
- var sinZ = SZ_rad.sin();
- var sinS = slp_rad.sin();
- var cosAziDiff = (SA_rad.subtract(asp_rad)).cos();
- var aspect_illumination = sinZ.expression("sinZ * sinS * cosAziDiff",
- {'sinZ': sinZ,
- 'sinS': sinS,
- 'cosAziDiff': cosAziDiff});
- // full illumination condition (IC)
- var ic = slope_illumination.add(aspect_illumination);
-
- // Add IC to original image
- var img_plus_ic = ee.Image(img.addBands(ic.rename('IC')).addBands(cosZ.rename('cosZ')).addBands(cosS.rename('cos
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。