google/earthengine-api · 文件 下载 ZIP
文件最后提交记录最后更新时间
README.md
以下内容由 AI 翻译,如有问题请点此提交 issue 反馈
Google Earth Engine API
用于调用 Google Earth Engine API 的 Python 和 JavaScript 客户端库。
以下是示例截图及对应的代码编辑器 JavaScript 代码:

// Compute the trend of night-time lights.
// Adds a band containing image date as years since 1991.
function createTimeBand(img) {
var year = ee.Date(img.get('system:time_start')).get('year').subtract(1991);
return ee.Image(year).byte().addBands(img);
}
// Map the time band creation helper over the night-time lights collection.
// https://developers.google.com/earth-engine/datasets/catalog/NOAA_DMSP-OLS_NIGHTTIME_LIGHTS
var collection = ee.ImageCollection('NOAA/DMSP-OLS/NIGHTTIME_LIGHTS')
.select('stable_lights')
.map(createTimeBand);
// Compute a linear fit over the series of values at each pixel, visualizing
// the y-intercept in green, and positive/negative slopes as red/blue.
Map.addLayer(
collection.reduce(ee.Reducer.linearFit()),
{min: 0, max: [0.18, 20, -0.18], bands: ['scale', 'offset', 'scale']},
'stable lights trend');
通知
为能更及时地处理错误报告与功能请求,我们目前使用的是 Google Issue Tracker,而非 GitHub Issue Tracker。有关如何浏览及向 Issue Tracker 提交问题的详细信息,请参阅 Earth Engine 文档中的获取帮助页面]。