GEE 图表:利用CGIAR/SRTM90_V4绘制雷尼尔山登山步道沿途的海拔高度图表

目录

简介

函数

ui.Chart.image.byRegion(image, regions, reducer, scale, xProperty)

Arguments:

Returns: ui.Chart

代码

结果


简介

CGIAR/SRTM90_V4是由国际农业研究中心(CGIAR)和美国国家地理空间智能局(NGA)共同开发的地形高程数据集。该数据集基于Shuttle Radar Topography Mission(SRTM)的数据,提供全球范围内的90米分辨率的地形高程数据。

SRTM是一项由NASA和NGA合作进行的航天任务,旨在获取全球范围内的数字高程模型数据。该任务由航天飞机搭载雷达设备,对地球表面进行测量,提供了全球范围内的高质量地形高程数据。

CGIAR/SRTM90_V4数据集是使用SRTM数据进行处理和处理的结果。它提供了全球范围内的地形高程数据,分辨率为90米。数据集中的每个像素代表了90米×90米的地面区域的高程值。

该数据集在许多应用中非常有用,包括地理信息系统(GIS)、地貌学研究、水文建模和土地利用规划。它可以用于创建地形图、生成等高线、分析洪水风险和计算水资源等。

CGIAR/SRTM90_V4数据集可以免费获取,并且易于使用。它以GeoTIFF格式提供,可以与各种GIS软件和工具进行集成和分析。数据集还提供了一些附加信息,例如数据质量评估和处理过程的描述,以帮助用户更好地理解和使用数据。

函数

ui.Chart.image.byRegion(image, regionsreducerscalexProperty)

Generates a Chart from an image. Extracts and plots band values in one or more regions in the image, with each band in a separate series.

  • X-axis = Region labeled by xProperty (default: 'system:index')

  • Y-axis = Reducer output.

  • Series = Band name.

Returns a chart.

Arguments:

image (Image):

Image to extract band values from.

regions (Feature|FeatureCollection|Geometry|List<Feature>|List<Geometry>, optional):

Regions to reduce. Defaults to the image's footprint.

reducer (Reducer, optional):

Reducer that generates the value(s) for the y-axis. Must return a single value per band. Defaults to ee.Reducer.mean().

scale (Number, optional):

Scale to use with the reducer in meters.

xProperty (String, optional):

Property to be used as the label for each Region on the x-axis. Defaults to 'system:index'.

Returns: ui.Chart

代码

// 绘制雷尼尔山登山步道沿途的海拔高度。

var elevation = ee.Image('CGIAR/SRTM90_V4');
var waypoints = [
  ee.Feature(
      ee.Geometry.Point([-121.7353, 46.78622]),
      {'name': 'Paradise Ranger Station'}),
  ee.Feature(
      ee.Geometry.Point([-121.72529, 46.8093]), {'name': 'Pebble Creek'}),
  ee.Feature(
      ee.Geometry.Point([-121.72585, 46.8102899]),
      {'name': 'Start of Glacier'}),
  ee.Feature(
      ee.Geometry.Point([-121.7252699, 46.81202]), {'name': 'Glacier Point 1'}),
  ee.Feature(
      ee.Geometry.Point([-121.72453, 46.81661]), {'name': 'Glacier Point 2'}),
  ee.Feature(
      ee.Geometry.Point([-121.72508, 46.82262]), {'name': 'Little Africa'}),
  ee.Feature(
      ee.Geometry.Point([-121.7278699, 46.82648]), {'name': 'Moon Rocks'}),
  ee.Feature(ee.Geometry.Point([-121.73281, 46.8354]), {'name': 'Camp Muir'}),
  ee.Feature(ee.Geometry.Point([-121.75976, 46.85257]), {'name': 'Summit'})
];

var rainierWaypoints = ee.FeatureCollection(waypoints);

//图表加载
var chart = ui.Chart.image.byRegion({
  image: elevation,
  regions: rainierWaypoints,
  scale: 200,
  xProperty: 'name'
});
chart.setOptions({
  title: 'Mt. Rainier Summit Trail Elevation',
  vAxis: {
    title: 'Elevation (meters)'
  },
  legend: 'none',
  lineWidth: 1,
  pointSize: 4
});

print(chart);

Map.addLayer(elevation, {min: 500, max: 4500});
Map.addLayer(rainierWaypoints, {color: 'FF0000'});
Map.setCenter(-121.75976, 46.85257, 11);

结果

猜你喜欢

转载自blog.csdn.net/qq_31988139/article/details/143160429