Google earth engine(GEE)——根据点绘制折线图

简介: Google earth engine(GEE)——根据点绘制折线图


因为这次要用到点的数据,所以首先看要用到的工具:

 

一座山从底下到山顶的一个爬坡变化情况

 

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

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.//这里明确给出了用byRegion就是返回一个序列

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',
  width:1000,
  height:500,
  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);


这是修改参数后的图形,设置了图形的长宽看起来更加合理

 


相关文章
|
4月前
|
数据可视化 定位技术 Sentinel
如何用Google Earth Engine快速、大量下载遥感影像数据?
【2月更文挑战第9天】本文介绍在谷歌地球引擎(Google Earth Engine,GEE)中,批量下载指定时间范围、空间范围的遥感影像数据(包括Landsat、Sentinel等)的方法~
1942 1
如何用Google Earth Engine快速、大量下载遥感影像数据?
|
4月前
|
机器学习/深度学习 算法 数据可视化
基于Google Earth Engine云平台构建的多源遥感数据森林地上生物量AGB估算模型含生物量模型应用APP
基于Google Earth Engine云平台构建的多源遥感数据森林地上生物量AGB估算模型含生物量模型应用APP
193 0
|
4月前
GEE——Google dynamic world中在影像导出过程中无法完全导出较大面积影像的解决方案(投影的转换)EPSG:32630和EPSG:4326的区别
GEE——Google dynamic world中在影像导出过程中无法完全导出较大面积影像的解决方案(投影的转换)EPSG:32630和EPSG:4326的区别
92 0
|
4月前
|
存储 编解码 数据可视化
Google Earth Engine获取随机抽样点并均匀分布在栅格的不同数值区中
【2月更文挑战第14天】本文介绍在谷歌地球引擎(Google Earth Engine,GEE)中,按照给定的地表分类数据,对每一种不同的地物类型,分别加以全球范围内随机抽样点自动批量选取的方法~
424 1
Google Earth Engine获取随机抽样点并均匀分布在栅格的不同数值区中
|
4月前
|
API Go 网络架构
GEE Colab——如何从本地/Google云盘/Google Cloud Storage (GCS)上传和下载
GEE Colab——如何从本地/Google云盘/Google Cloud Storage (GCS)上传和下载
241 4
|
4月前
|
机器学习/深度学习 存储 人工智能
GEE Colab——初学者福音快速入门 Google Colab(Colaboratory)
GEE Colab——初学者福音快速入门 Google Colab(Colaboratory)
202 3
|
4月前
|
数据处理
Google Earth Engine(GEE)——sentinel-1数据处理过程中出现错误Dictionary does not contain key: bucketMeans
Google Earth Engine(GEE)——sentinel-1数据处理过程中出现错误Dictionary does not contain key: bucketMeans
80 0
|
4月前
|
编解码 人工智能 算法
Google Earth Engine——促进森林温室气体报告的全球时间序列数据集
Google Earth Engine——促进森林温室气体报告的全球时间序列数据集
71 0
|
4月前
|
编解码 人工智能 数据库
Google Earth Engine(GEE)——全球道路盘查项目全球道路数据库
Google Earth Engine(GEE)——全球道路盘查项目全球道路数据库
100 0
|
4月前
|
编解码
Open Google Earth Engine(OEEL)——matrixUnit(...)中产生常量影像
Open Google Earth Engine(OEEL)——matrixUnit(...)中产生常量影像
59 0

热门文章

最新文章