問(wèn)題:
// I don't know if some standard value exists for the radius, in the same, I will assume that some software would prefer to use square shape, but circle makes more sense to me.
// pixels is noice if you want to zoom in and out to visualize, but maybe for export or computation you would prefer meters?
// 我不知道半徑是否有標(biāo)準(zhǔn)值,同樣,我認(rèn)為有些軟件更傾向于使用正方形,但我認(rèn)為圓形更合理。
// 如果你想放大或縮小以進(jìn)行可視化,像素是不錯(cuò)的選擇,但對(duì)于導(dǎo)出或計(jì)算,你可能更傾向于使用米。
很多時(shí)候你也會(huì)遇到這種情況,當(dāng)我們對(duì)于加載后的影像出現(xiàn)無(wú)法展示或者其它一些可視化的問(wèn)題時(shí),就會(huì)出現(xiàn)上面的狀況。
解決方案:
影像可視化范圍應(yīng)根據(jù)縮放級(jí)別進(jìn)行調(diào)整,如果放大,平均區(qū)域顯然會(huì)變小,差異也會(huì)變小。
本文的TPI指數(shù)的展示過(guò)程中出現(xiàn)的錯(cuò)誤,其中TPI具體指
TPI指地形坡度指數(shù)(Topographic Position Index),它是一種用于描述地表地形的指數(shù)。TPI指數(shù)可以通過(guò)計(jì)算某一點(diǎn)周圍區(qū)域的高程值來(lái)得出,其值代表了該點(diǎn)相對(duì)于周圍區(qū)域的高度位置。TPI指數(shù)可以用于研究地形對(duì)生態(tài)系統(tǒng)和水文循環(huán)等方面的影響,也可以用于進(jìn)行地貌分析和地形分類。
TPI地形指數(shù)在地貌分析和地形分類中具有以下作用:
1. 地形分類:TPI指數(shù)可以幫助將地表地形劃分為不同的類別,如凹地、山脊、平原等。通過(guò)對(duì)TPI值的分析,可以更好地理解地形特征和地貌類型。
2. 地貌分析:TPI指數(shù)可以提供關(guān)于地表地形的詳細(xì)信息,如坡度、地勢(shì)起伏等。這些信息對(duì)于環(huán)境評(píng)估、土地利用規(guī)劃和自然資源管理等方面非常重要。
3. 生態(tài)系統(tǒng)研究:TPI指數(shù)可以用于研究地形對(duì)生態(tài)系統(tǒng)的影響。不同的地形類型可能具有不同的水文條件、土壤類型和植被分布,因此TPI指數(shù)可以幫助揭示地形與生態(tài)系統(tǒng)之間的關(guān)聯(lián)性。
4. 水文循環(huán):TPI指數(shù)可以用于研究地形對(duì)水文循環(huán)的影響。高TPI值的區(qū)域可能具有較高的坡度和水流速度,可能對(duì)降雨徑流和水資源分配產(chǎn)生重要影響。
總之,TPI地形指數(shù)在地貌學(xué)、生態(tài)學(xué)、水文學(xué)等領(lǐng)域中具有廣泛的應(yīng)用,可以提供對(duì)地表地形特征和其對(duì)環(huán)境和生態(tài)系統(tǒng)的影響的深入理解。文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-715328.html
代碼:
//COPERNICUS 加載可視化參數(shù)和研究區(qū)域
var imageVisParam = {"opacity":1,"bands":["classification"],"min":0,"max":6,"palette":["a3e657","7fb543","5c8231","09570e","e09435","cd6fff","cc0e3a"]},
geometry =
/* color: #98ff00 */
/* shown: false */
/* displayProperties: [
{
"type": "rectangle"
}
] */
ee.Geometry.Polygon(
[[[101.65166678243405, 72.74142473849005],
[101.65166678243405, 50.79933635280348],
[190.24541678243406, 50.79933635280348],
[190.24541678243406, 72.74142473849005]]], null, false),
Plots3 = ee.FeatureCollection("users/leaenguehard/Plots3"),
RF_Entire_Area = ee.Image("users/leaenguehard/RF_Entire_Area"),
geometry2 =
/* color: #98ff00 */
/* shown: false */
/* displayProperties: [
{
"type": "rectangle"
}
] */
ee.Geometry.Polygon(
[[[129.39412494682568, 65.42449957439194],
[129.39412494682568, 64.53241214116831],
[131.67928119682568, 64.53241214116831],
[131.67928119682568, 65.42449957439194]]], null, false);
// 加載DEM數(shù)據(jù)
var dataset = ee.ImageCollection('COPERNICUS/DEM/GLO30').filterBounds(geometry);
var elevationVis = {
min: 0.0,
max: 2500.0,
palette: ['0000ff','00ffff','ffff00','ff0000','ffffff'],
};
var elevation = dataset.select('DEM')
// 計(jì)算坡度坡向
var calculateSlopeAspect = function(image) {
// Compute slope and aspect
var slope = ee.Terrain.slope(image);
var aspect = ee.Terrain.aspect(image);
// Return the image with new bands for slope and aspect
return image.addBands(slope.rename('slope')).addBands(aspect.rename('aspect'));
};
elevation=ee.Join.saveAll("match").apply(elevation,elevation,ee.Filter.withinDistance({distance:300, leftField:'.geo', rightField: '.geo', maxError:100}))
elevation=ee.ImageCollection(elevation).map(function(im){
var extendedIM=ee.ImageCollection(ee.List(im.get("match"))).mosaic().setDefaultProjection(im.projection())
return calculateSlopeAspect(extendedIM).clip(im.geometry())
})
elevation=elevation.mosaic()
// 可視化圖層
Map.addLayer(elevation.select('DEM'), elevationVis, 'DEM mosaic');
Map.addLayer(elevation.select('slope'), {min: 0, max: 45, palette: ['blue', 'green', 'yellow', 'orange', 'red']}, 'Slope');
Map.addLayer(elevation.select('aspect'), {min: 0, max: 360, palette: ['blue', 'cyan', 'green', 'yellow', 'orange', 'red']}, 'Aspect');
// 打印影像結(jié)果
print('Number of copernicus Images:', dataset.size());
print(elevation)
//進(jìn)行核函數(shù)聚類處理的TPI指數(shù)
var TPI=elevation.select('DEM').subtract(elevation.select('DEM').convolve(ee.Kernel.circle(50,"pixels")))
//調(diào)整范圍
Map.addLayer(TPI, {min: -250, max: 250, palette: ['blue', 'yellow','red']}, 'TPI')
文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-715328.html
到了這里,關(guān)于GEE錯(cuò)誤——影像加載過(guò)程中出現(xiàn)的圖層無(wú)法展示的解決方案的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!