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 段階で変数に入る. 例 †標高分布を描いてみた例. // 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
参考 † |