Anuncio: Todos los proyectos no comerciales registrados para usar Earth Engine antes del
15 de abril de 2025 deben
verificar su elegibilidad no comercial para mantener el acceso a Earth Engine.
ee.Algorithms.TemporalSegmentation.StructuralChangeBreakpoints
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Ejecuta la detección de puntos de interrupción, de manera similar a la función breakpoints de strucchange de R.
Cada píxel se ajusta con un modelo lineal/armónico por partes, de la siguiente forma:
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)) + …
En esta ecuación, "t" es la hora de inicio de la imagen en el formato especificado por "dateFormat", y "season(t)" es el año fraccionario de esa hora de inicio (consulta la descripción de dateFormat para obtener más detalles). El orden máximo de los términos armónicos se determina con "seasonalModelOrder".
El resultado es una imagen que contiene dos bandas, más dos bandas por banda en la entrada:
tStart
, tEnd
: Cada uno de estos campos contiene un array unidimensional, con una entrada por segmento en el ajuste lineal por tramos. Cada entrada contiene la hora de inicio de la primera o la última imagen en ese segmento. De forma predeterminada, los valores aquí se expresan en años fraccionarios para facilitar el uso con los coeficientes.
coefs_BANDNAME
: Habrá una banda de salida de este tipo por cada banda de entrada. Cada uno de estos contiene un array 2D, con una fila por segmento. Los valores de esa fila son los coeficientes del ajuste lineal para ese segmento, es decir, los valores de A, B, C… para ese segmento. Como se describió anteriormente, los valores aquí se ven afectados por "dateFormat".
.rmse_BANDNAME
: Habrá una banda de salida de este tipo por cada banda de entrada. Contiene un array 1D, con una entrada por segmento. El valor de cada segmento es el RMSE de los residuos del ajuste lineal para ese segmento.
Uso | Muestra |
---|
ee.Algorithms.TemporalSegmentation.StructuralChangeBreakpoints(collection, breakpointBand, seasonalModelOrder, minSpacing, maxBreaks, dateFormat) | Imagen |
Argumento | Tipo | Detalles |
---|
collection | ImageCollection | Colección de imágenes en las que se detectarán los puntos de interrupción. |
breakpointBand | Cadena, valor predeterminado: nulo | Nombre de la banda que se usará para la detección de puntos de interrupción. Solo es opcional si las imágenes tienen una sola banda. |
seasonalModelOrder | Número entero, valor predeterminado: 3 | Es el orden del modelo armónico estacional. |
minSpacing | Número de punto flotante, valor predeterminado: 0.15 | Es el espaciado mínimo entre los puntos de interrupción. Si el valor está entre 0 y 1 (sin incluir estos valores), se interpretará como una fracción de la cantidad de imágenes de la colección. De lo contrario, se interpretará como una cantidad de muestras. |
maxBreaks | Número entero, valor predeterminado: 0 | Es la cantidad máxima de puntos de interrupción. |
dateFormat | Número entero, valor predeterminado: 1 | Es la representación de tiempo que se usará en los resultados: 1 = años fraccionarios, 2 = tiempo Unix en milisegundos. Esto afecta los valores de las bandas tStart y tEnd, y los valores "t" que se usan en el modelo armónico. Los años fraccionarios que se usan aquí y en ese modelo se definen como la cantidad fraccionaria de años de 365.25 días desde el 1 de enero de 1970. |
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2025-07-26 (UTC)
[null,null,["Última actualización: 2025-07-26 (UTC)"],[[["\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. |"]]