GEE 训练教程——使用地理坐标系计算面积的一种方法(即非等面积投影法)
注:这是使用地理坐标系计算面积的一种方法(即非等面积投影法)
USGS代表美国地质调查局(United States Geological Survey),3DEP代表三维立体绘图计划(3D Elevation Program),而10m数据指的是数据分辨率为10米。
3DEP是一个由美国地质调查局主导的全国性计划,旨在收集、整合和提供高质量、高分辨率的地理高程数据。该计划的目标是为公众、政府和私营部门提供用于研究、规划和决策的准确和一致的高程数据。
10m数据是指数据的水平间距为10米,即每个像素代表10米的地理空间。这种高分辨率的数据对于许多应用非常有用,如地形分析、水资源管理、洪水预测和规划、城市规划等。
美国地质调查局通过航空激光雷达(LiDAR)和其他技术收集高程数据,并将其整合到一个统一的数据集中。这些数据包括地面表面高程、建筑物和植被物体的高程等。
用户可以通过USGS的数据门户或其他地理信息系统(GIS)工具访问和下载这些数据。这些数据可以用于各种领域的研究和应用,包括地理信息系统、环境科学、地质学、气象学等。
总之,USGS/3DEP/10m数据提供了具有高分辨率的地理高程数据,为用户提供了准确和一致的地形信息,可用于各种研究和应用领域。
Generate an image in which the value of each pixel is the area of that pixel in square meters. The returned image has a single band called "area."
生成一幅图像,其中每个像素的值都是该像素的面积(平方米)。返回的图像有一个名为 “面积 ”的单一波段。
Apply a reducer to all the pixels in a specific region.
Either the reducer must have the same number of inputs as the input image has bands, or it must have a single input and will be repeated for each band.
Returns a dictionary of the reducer's outputs.
对特定区域的所有像素应用缩放器。
该还原器的输入数必须与输入图像的波段数相同,或者只有一个输入数,并对每个波段进行重复处理。
返回缩放器输出的字典。
this:image (Image):
The image to reduce.
reducer (Reducer):
The reducer to apply.
geometry (Geometry, default: null):
The region over which to reduce data. Defaults to the footprint of the image's first band.
scale (Float, default: null):
A nominal scale in meters of the projection to work in.
crs (Projection, default: null):
The projection to work in. If unspecified, the projection of the image's first band is used. If specified in addition to scale, rescaled to the specified scale.
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 'scale', and replaces any transform already set on the projection.
bestEffort (Boolean, default: false):
If the polygon would contain too many pixels at the given scale, compute and use a larger scale which would allow the operation to succeed.
maxPixels (Long, default: 10000000):
The maximum number of pixels to reduce.
tileScale (Float, default: 1):
A scaling factor between 0.1 and 16 used to adjust aggregation tile size; setting a larger tileScale (e.g., 2 or 4) uses smaller tiles and may enable computations that run out of memory with the default.
Returns a Reducer that computes the (weighted) sum of its inputs. Where applicable, the output name is "sum".
返回一个计算其输入(加权)总和的还原器。在适用情况下,输出名称为 “sum”。
/** GEE WORKED examples
*
* ee.Image.pixelArea()
*
* 注:这是使用地理坐标系计算面积的一种方法(即非等面积投影法)
*/
var Colorado =
/* color: #d63000 */
/* displayProperties: [
{
"type": "rectangle"
}
] */
ee.Geometry.Polygon(
[[[-109.04239792823792, 41.03231084209813],
[-109.04239792823792, 36.970274655211874],
[-102.05509324073792, 36.970274655211874],
[-102.05509324073792, 41.03231084209813]]], null, false);
// .pixelArea() 返回像素的面积(平方米)。
var areaOfPixelSquareMeters = ee.Image.pixelArea()
Map.addLayer(areaOfPixelSquareMeters, {}, 'Area in square meters -- note sensitive to zoom!')
// 在计算一组像素的面积时非常有用
var elevation = ee.Image('USGS/3DEP/10m').select('elevation')
var elevation14ers = elevation.gt(14000 / 3.281)
Map.addLayer(elevation14ers,{min:0,max:1},'14ers')
var elevation14ersPixelArea = elevation14ers
.multiply(ee.Image.pixelArea())
.rename('14ers')
var areaOf14ers = elevation14ersPixelArea.reduceRegion({
reducer: ee.Reducer.sum(),
geometry: Colorado,
scale: 100,
maxPixels: 1E13
});
print("Area of 14ers (sq. meters)", areaOf14ers);