הודעה: כל הפרויקטים הלא מסחריים שנרשמו לשימוש ב-Earth Engine לפני 15 באפריל 2025 חייבים לאמת את הזכאות לשימוש לא מסחרי כדי לשמור על הגישה. אם לא תאמתו את החשבון עד 26 בספטמבר 2025, יכול להיות שהגישה שלכם תושעה.
שימו לב ש-gradient() מניב שתי רצועות: שיפוע בכיוון X ושיפוע בכיוון Y. כפי שמוצג בדוגמה, אפשר לשלב את שני הכיוונים כדי לקבל את עוצמת השיפוע ואת הכיוון שלו. העוצמה אמורה להיראות בערך כמו באיור 1.
איור 1. עוצמת שיפוע פנוכרומטי של תמונות Landsat 8 מעל אזור מפרץ סן פרנסיסקו, קליפורניה, ארה"ב.
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],["The `image.gradient()` function computes the gradient of each image band, outputting X and Y-direction gradients. The example loads a Landsat 8 panchromatic band image, calculates the X and Y gradients, then determines the gradient's magnitude by combining the squared X and Y values and the gradient's direction using `atan2` function. Finally, it displays the gradient and its direction, centered on San Francisco. The image gradient magnitude is then illustrated.\n"]]