Google Earth Engine(GEE)——特征和特征集合可视化FeatureCollection

简介: Google Earth Engine(GEE)——特征和特征集合可视化FeatureCollection

与图像、几何图形和特征一样,特征集合可以直接添加到地图中Map.addLayer()。默认的可视化将显示带有黑色实线和半透明黑色填充的矢量。要以颜色呈现矢量,请指定color参数。下面以红色显示“RESOLVE”生态区(Dinerstein et al. 2017)作为默认可视化:

// 加载一个矢量几何从一个数据库中
var ecoregions = ee.FeatureCollection('RESOLVE/ECOREGIONS/2017');
//加载影像并使用默认颜色和红色进行填充
Map.addLayer(ecoregions, {}, 'default display');
//这里的color就是相当于这个{}中的一个字典中的键值,还可以设定min,max等
Map.addLayer(ecoregions, {color: 'FF0000'}, 'colored');
//如需其他显示选项,请使用featureCollection.draw(). 
Map.addLayer(ecoregions.draw({color: '006600', strokeWidth: 5}), {}, 'drawn');

这里用到的函数:


Map.addLayer(eeObject, visParams, name, shown, opacity)

这里的参数主要是前三个,要加载在地图上的对象;颜色参数,图层名称

Adds a given EE object to the map as a layer.

Returns the new map layer.


Arguments:

eeObject (Collection|Feature|Image|RawMapId):

The object to add to the map.

visParams (FeatureVisualizationParameters|ImageVisualizationParameters, optional):

The visualization parameters. For Images and ImageCollection, see ee.data.getMapId for valid parameters. For Features and FeatureCollections, the only supported key is "color", as a CSS 3.0 color string or a hex string in "RRGGBB" format. Ignored when eeObject is a map ID.

name (String, optional):

The name of the layer. Defaults to "Layer N".

shown (Boolean, optional):

A flag indicating whether the layer should be on by default.

一个标志,指示默认情况下是否应打开图层。一般默认都会打开的

opacity (Number, optional):这里设置值图层的透明程度

The layer's opacity represented as a number between 0 and 1. Defaults to 1.


Returns: ui.Map.Layer


最后这个绿色的线条看起来比加粗,主要是设置了宽度:strokeWidth: 5


注:Map.addLayer(ecoregions, {color: ecoregions.randomVisualizer}, 'default display');在这里你可以尝试使用随机颜色作为属性值,我这里就不再尝试了

 


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