公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Algorithms.TemporalSegmentation.StructuralChangeBreakpoints
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
运行断点检测,类似于 R 的 strucchange::breakpoints 函数。
每个像素都通过分段线性/谐波模型进行拟合,形式如下
Y = A + B * t + C * cos(2 * pi * season(t)) + D * sin(2 * pi * season(t)) + E * cos(4 * pi * season(t)) + F * sin(4 * pi * season(t)) + ...
在此等式中,“t”是图片的开始时间,格式由“dateFormat”指定;“season(t)”是相应开始时间的分数年份(有关详情,请参阅 dateFormat 的说明)。谐波项的最大阶数由“seasonalModelOrder”确定。
结果是一张包含两个频段的图片,以及输入中每个频段的两个频段:
tStart
、tEnd
:每个变量都包含一个一维数组,分段线性拟合中的每个段对应一个条目;每个条目都包含相应段中第一张或最后一张图片的开始时间。默认情况下,此处的值以年为单位(以小数形式表示),以便与系数搭配使用。
coefs_BANDNAME
:每个输入波段都将对应一个这样的输出波段。每个变量都包含一个二维数组,每个细分都对应一行。相应行中的值是相应细分的线性拟合系数,即相应细分的 A、B、C 等值。如上所述,此处的值会受到“dateFormat”的影响
.rmse_BANDNAME
:每个输入频段都会有一个这样的输出频段。此属性包含一个一维数组,每个分段对应一个条目。每个细分区的值是相应细分区的线性拟合残差的 RMSE。
用法 | 返回 |
---|
ee.Algorithms.TemporalSegmentation.StructuralChangeBreakpoints(collection, breakpointBand, seasonalModelOrder, minSpacing, maxBreaks, dateFormat) | 图片 |
参数 | 类型 | 详细信息 |
---|
collection | ImageCollection | 用于检测断点的图片集合。 |
breakpointBand | 字符串,默认值:null | 用于检测中断点的频段的名称。仅当图片只有一个波段时,此参数才是可选的。 |
seasonalModelOrder | 整数,默认值:3 | 谐波季节性模型的阶数。 |
minSpacing | 浮点数,默认值:0.15 | 断点之间的最小间距。如果此值介于 0 和 1 之间(不含),则会被解读为集合中图片数量的一部分。否则,系统会将其解读为样本数量。 |
maxBreaks | 整数,默认值:0 | 断点的最大数量。 |
dateFormat | 整数,默认值:1 | 结果中要使用的时间表示形式:1 = 小数年,2 = 以毫秒为单位的 Unix 时间。这会影响 tStart 和 tEnd 区间中的值以及谐波模型中使用的“t”值。此处和该模型中使用的分数年定义为自 1970 年 1 月 1 日以来 365.25 天年份的分数。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eDetects breakpoints in an image collection using a piecewise linear/harmonic model, similar to R's \u003ccode\u003estrucchange::breakpoints\u003c/code\u003e function.\u003c/p\u003e\n"],["\u003cp\u003eOutputs an image with bands indicating breakpoint start/end times, model coefficients for each segment, and RMSE for each segment's fit.\u003c/p\u003e\n"],["\u003cp\u003eAllows customization of the harmonic model's order, minimum breakpoint spacing, maximum number of breakpoints, and time representation format.\u003c/p\u003e\n"],["\u003cp\u003eUses a model that incorporates a linear trend and seasonal harmonics to fit pixel values over time.\u003c/p\u003e\n"],["\u003cp\u003eThe algorithm identifies the optimal breakpoints by minimizing the residual error of the piecewise model.\u003c/p\u003e\n"]]],["The function `StructuralChangeBreakpoints` detects breakpoints in an image collection, fitting each pixel with a piecewise linear/harmonic model. Input parameters include `collection`, `breakpointBand`, `seasonalModelOrder`, `minSpacing`, `maxBreaks`, and `dateFormat`. The output image contains `tStart` and `tEnd` bands, which hold segment start and end times. Additionally, there are `coefs_BANDNAME` bands, that contain linear fit coefficients and `rmse_BANDNAME` bands with the root-mean-square error for each segment.\n"],null,["# ee.Algorithms.TemporalSegmentation.StructuralChangeBreakpoints\n\nRuns breakpoint detection, similar to R's strucchange::breakpoints function.\n\n\u003cbr /\u003e\n\nEach pixel is fit by a piecewise linear/harmonic model, of the form\n\nY = A + B \\* t + C \\* cos(2 \\* pi \\* season(t)) + D \\* sin(2 \\* pi \\* season(t)) + E \\* cos(4 \\* pi \\* season(t)) + F \\* sin(4 \\* pi \\* season(t)) + ...\n\nIn this equation, 't' is the start time of the image in the format specified by 'dateFormat', and 'season(t)' is the fractional year of that start time (see the description of dateFormat for details). The maximum order of the harmonic terms is determined by 'seasonalModelOrder'.\n\nThe result is an image containing two bands, plus two bands per band in the input:\n\n`tStart`, `tEnd`: each of these holds a 1D array, with one entry per segment in the piecewise linear fit; each entry contains the start time of the first or last images in that segment. By default the values here are in fractional years, for easy use with the coefficients.\n\n`coefs_BANDNAME`: there will be one such output band per input band. Each of these holds a 2D array, with one row per segment. The values in that row are the coefficients of the linear fit for that segment - that is, the values of A, B, C, ... for that segment. As described above, the values here are affected by 'dateFormat'\n\n.`rmse_BANDNAME`: there will be one such output band per input band. This holds a 1D array, with one entry per segment. The value for each segment is the RMSE for the linear fit residuals for that segment.\n\n| Usage | Returns |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|\n| `ee.Algorithms.TemporalSegmentation.StructuralChangeBreakpoints(collection, `*breakpointBand* `, `*seasonalModelOrder* `, `*minSpacing* `, `*maxBreaks* `, `*dateFormat*`)` | Image |\n\n| Argument | Type | Details |\n|----------------------|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `collection` | ImageCollection | Collection of images on which to detect breakpoints. |\n| `breakpointBand` | String, default: null | The name of the band to use for breakpoint detection. Optional only if the images have only a single band. |\n| `seasonalModelOrder` | Integer, default: 3 | The order of the harmonic seasonal model. |\n| `minSpacing` | Float, default: 0.15 | The minimum spacing between breakpoints. If this is between 0 and 1 (exclusive), it will be interpreted as a fraction of the number of images in the collection. Otherwise, it will be interpreted as a number of samples. |\n| `maxBreaks` | Integer, default: 0 | The maximum number of breakpoints. |\n| `dateFormat` | Integer, default: 1 | The time representation to use in the results: 1 = fractional years, 2 = unix time in milliseconds. This affects the values in the tStart and tEnd bands and the 't' values used in the harmonic model. The fractional years used here and in that model are defined as the fractional number of 365.25-day years since 1 Jan 1970. |"]]