公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Algorithms.TemporalSegmentation.C2c
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
复合 2 变化 (C2C) 算法的实现。此算法使用分段线性拟合来分割时间序列,并使用最少的段数来拟合数据,使均方根误差 (RMSE) 不超过给定的最大值。对于给定的每个频段,该算法将返回以下频段:
changeDate:一个双精度型一维数组,表示每个拟合段的开始日期和结束日期对。日期格式由 dateFormat 实参确定。
value:一个一维双精度数组,表示在 changeDate 处波段的值。
magnitude:一个双精度型一维数组,用于提供更改日期之前和之后的值之间的绝对差。第一个幅度始终为 NaN。
duration:一个双精度浮点数的一维数组,表示更改日期之前的细分时长。第一个时长始终为 NaN。
rate:一个双精度型的一维数组,表示更改日期之前的数据变化率。第一个比率始终为 NaN。
postMagnitude:一个双精度的一维数组,用于存储更改日期之后的值与更改日期时的值之间的绝对差值。最后一个 postMagnitude 始终为 NaN。
postDuration:更改日期之后的细分时长。最后一个 postDuration 始终为 NaN。
postRate:更改日期之后的数据变化率。最后一个 postRate 始终为 NaN。
如需详细了解原始算法,请参阅 Hermosilla 等人 (2015) 的论文,网址为 dx.doi.org/10.1016/j.rse.2014.11.005。
此算法处于预览阶段,可能会发生变化。
用法 | 返回 |
---|
ee.Algorithms.TemporalSegmentation.C2c(collection, dateFormat, maxError, maxSegments, startYear, endYear, infill, spikesTolerance) | 图片 |
参数 | 类型 | 详细信息 |
---|
collection | ImageCollection | 要运行 C2C 的图片集合。 |
dateFormat | 整数,默认值:0 | 拟合期间要使用的时间表示形式:0 = jDays,1 = 小数年,2 = 以毫秒为单位的 Unix 时间。每个时间段的开始时间、结束时间和中断时间都将以这种方式进行编码。 |
maxError | 浮点数,默认值:75 | |
maxSegments | 整数,默认值:6 | |
startYear | 整数,默认值:1984 | |
endYear | 整数,默认值:2019 | |
infill | 布尔值,默认值:true | |
spikesTolerance | 浮点数,默认值:0.85 | |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[],[],null,["# ee.Algorithms.TemporalSegmentation.C2c\n\nAn implementation of the Composite 2 Change (C2C) algorithm. This algorithm segments a time series using a piecewise linear fit with the minimum of segments required to fit the data within the given maximum root mean squared error (RMSE). For every band given the algorithm will return the following bands:\n\n\u003cbr /\u003e\n\nchangeDate:A 1D array of doubles representing pairs of start and end dates for each fitted segment. The date format is determined by the dateFormat argument.\n\nvalue: A 1D array of doubles of the value of the band at the changeDate.\n\nmagnitude: A 1D array of doubles providing the absolute difference between the values before and after a change date. The first magnitude is always NaN.\n\nduration: A 1D array of doubles of the duration of the segment preceding the change date. The first duration is always NaN.\n\nrate: A 1D array of doubles of the rate of change of the data preceding the. change date. The first rate is always NaN.\n\npostMagnitude: A 1D array of doubles of the absolute difference between the values after the change date and the value at the change date. The last postMagnitude is always NaN.\n\npostDuration: The duration of the segment following the change date. The last postDuration is always NaN.\n\npostRate: The rate of change of the data following the change date. The last postRate is always NaN.\n\nSee Hermosilla et al. (2015) dx.doi.org/10.1016/j.rse.2014.11.005 for further details on the original algorithm.\n\nThis algorithm is in preview and is subject to change.\n\n| Usage | Returns |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|\n| `ee.Algorithms.TemporalSegmentation.C2c(collection, `*dateFormat* `, `*maxError* `, `*maxSegments* `, `*startYear* `, `*endYear* `, `*infill* `, `*spikesTolerance*`)` | Image |\n\n| Argument | Type | Details |\n|-------------------|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `collection` | ImageCollection | Collection of images on which to run C2C. |\n| `dateFormat` | Integer, default: 0 | The time representation to use during fitting: 0 = jDays, 1 = fractional years, 2 = unix time in milliseconds. The start, end and break times for each temporal segment will be encoded this way. |\n| `maxError` | Float, default: 75 | |\n| `maxSegments` | Integer, default: 6 | |\n| `startYear` | Integer, default: 1984 | |\n| `endYear` | Integer, default: 2019 | |\n| `infill` | Boolean, default: true | |\n| `spikesTolerance` | Float, default: 0.85 | |"]]