ee.Algorithms.TemporalSegmentation.StructuralChangeBreakpoints
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מריץ זיהוי של נקודות עצירה, בדומה לפונקציה strucchange::breakpoints של R.
כל פיקסל מותאם למודל ליניארי או הרמוני מקוטע, מהצורה
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 = זמן יוניקס באלפיות השנייה. ההגדרה הזו משפיעה על הערכים בטווחים tStart ו-tEnd ועל הערכים של t שמשמשים במודל ההרמוני. שברי השנים שבהם נעשה שימוש כאן ובמודל הזה מוגדרים כשבר של מספר השנים של 365.25 ימים מאז 1 בינואר 1970. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 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. |"]]