GEE案例

GEE单像素图层

2019-01-05  本文已影响0人  赤豆冰棍

添加一个渐变图层

主要功能

新建一个像素面积为像元值的图层,呈现出渐变效果。

代码

// Displays the decreasing area covered by a single pixel at
// higher latitudes using the Image.pixelArea() function.

// Create an image in which the value of each pixel is its area.
var img = ee.Image.pixelArea();
Map.setCenter(0, 0, 3);
Map.addLayer(img, {min: 2e8, max: 4e8, opacity: 0.85}, 'pixel area');

步骤分析

  1. 创建ee对象,是一个ee的像素对象
  2. 设置地图中心,缩放等级
  3. 添加图层,显示结果

主要方法

  1. ee.Image.pixelArea()
    Generate an image in which the value of each pixel is the area of that pixel in square meters.
    No arguments.
    Returns: Image

生成一个影像对象,每一个像素的像素值是该像素值的面积(平方米)

上一篇 下一篇

猜你喜欢

热点阅读