Google Earth Engine - 高度なカラーパレットを使う

基本

GiuHubに ee-palettes というパッケージがあってこれを呼べば一般的な科学的カラースケールを利用できる.
呼び出し方は

// Pull the package from the GitHub repo which stores colour palettes to be used in GEE
// See https://github.com/gee-community/ee-palettes for more info
var palettes = require('users/gena/packages:palettes');

で,そこからパレットを選び.最大最小値を決める.パレットの種類は上記の GitHub のリポジトリを参照のこと.

var vis = {
  min: -5.0,
  max: 100.0,
  palette: palettes.crameri.tofino[50],
};

これで crameri の tonifo というパレットが 50 段階で変数に入る.

標高分布を描いてみた例.
読んでいる image は私の assets に入っているデータ(公開データではない).

// load
var image = ee.Image('users/miyashitafwk/topotif_tokyo');

// print information to console
print(image);

// Pull the package from the GitHub repo which stores colour palettes to be used in GEE
// See https://github.com/gee-community/ee-palettes for more info
var palettes = require('users/gena/packages:palettes');
var vis = {
  min: -5.0,
  max: 100.0,
  palette: palettes.crameri.tofino[50],
};

// show topohraphy (scientific colors)
Map.addLayer(image, vis, 'topo_tokyo_scientific'); // varname, color, label 
Map.centerObject(image, 11); // varname, zoom level
color_palette0.png



参考


Front page   Edit Diff Attach Copy Rename Reload   New List of pages Search Recent changes   Help   RSS of recent changes
Last-modified: 2022-07-03 (Sun) 16:26:30 (662d)