0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Google Earth Engineで植生

Posted at

概要

Google Earth Engineで、植生、計算してみた。

写真

無題.jpg

サンプルコード

var po = ee.Geometry.Point(140.429900, 37.796862);
Map.centerObject(po, 15);
function maskS2clouds(image) {
	var qa = image.select('QA60');
	var cloudBitMask = 1 << 10;
	var cirrusBitMask = 1 << 11;
	var mask = qa.bitwiseAnd(cloudBitMask).eq(0).and(qa.bitwiseAnd(cirrusBitMask).eq(0));
	return image.updateMask(mask).divide(10000);
}
var image = ee.ImageCollection('COPERNICUS/S2').filterDate('2018-01-01', '2018-06-30')
	.filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 20)).map(maskS2clouds).median();
Map.addLayer(image, {
	min: 0.0,
	max: 0.3,
	bands: ['B4', 'B3', 'B2'],
}, 'RGB');
var ndvi = image.expression('(G - R) / (G + R)', {
	'R': image.select('B4'),
	'G': image.select('B3'),
	'B': image.select('B2')
});
Map.addLayer(ndvi, {
	min: 0.0,
	max: 0.2,
	palette: ['white', 'green']
}, 'ndvi');


以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?