הודעה : כל הפרויקטים הלא מסחריים שנרשמו לשימוש ב-Earth Engine לפני
15 באפריל 2025 חייבים
לאמת את הזכאות לשימוש לא מסחרי כדי לשמור על הגישה. אם לא תאמתו את החשבון עד 26 בספטמבר 2025, יכול להיות שהגישה שלכם תושעה.
שליחת משוב
ee.Terrain.aspect
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
Calculates aspect in degrees from a terrain DEM.
השיפוע המקומי מחושב באמצעות 4 השכנים שמחוברים לכל פיקסל, ולכן ערכים חסרים יופיעו סביב הקצוות של התמונה.
שימוש החזרות ee.Terrain.aspect(input)
תמונה
ארגומנט סוג פרטים input
תמונה תמונה של גובה פני השטח, במטרים.
דוגמאות
עורך הקוד (JavaScript)
// A digital elevation model.
var dem = ee . Image ( 'NASA/NASADEM_HGT/001' ). select ( 'elevation' );
// Calculate slope. Units are degrees, range is [0,90).
var slope = ee . Terrain . slope ( dem );
// Calculate aspect. Units are degrees where 0=N, 90=E, 180=S, 270=W.
var aspect = ee . Terrain . aspect ( dem );
// Display slope and aspect layers on the map.
Map . setCenter ( - 123.457 , 47.815 , 11 );
Map . addLayer ( slope , { min : 0 , max : 89.99 }, 'Slope' );
Map . addLayer ( aspect , { min : 0 , max : 359.99 }, 'Aspect' );
// Use the ee.Terrain.products function to calculate slope, aspect, and
// hillshade simultaneously. The output bands are appended to the input image.
// Hillshade is calculated based on illumination azimuth=270, elevation=45.
var terrain = ee . Terrain . products ( dem );
print ( 'ee.Terrain.products bands' , terrain . bandNames ());
Map . addLayer ( terrain . select ( 'hillshade' ), { min : 0 , max : 255 }, 'Hillshade' );;
הגדרת Python
מידע על Python API ועל שימוש ב-geemap
לפיתוח אינטראקטיבי מופיע בדף
Python Environment .
import ee
import geemap.core as geemap
Colab (Python)
# A digital elevation model.
dem = ee . Image ( 'NASA/NASADEM_HGT/001' ) . select ( 'elevation' )
# Calculate slope. Units are degrees, range is [0,90).
slope = ee . Terrain . slope ( dem )
# Calculate aspect. Units are degrees where 0=N, 90=E, 180=S, 270=W.
aspect = ee . Terrain . aspect ( dem )
# Display slope and aspect layers on the map.
m = geemap . Map ()
m . set_center ( - 123.457 , 47.815 , 11 )
m . add_layer ( slope , { 'min' : 0 , 'max' : 89.99 }, 'Slope' )
m . add_layer ( aspect , { 'min' : 0 , 'max' : 359.99 }, 'Aspect' )
# Use the ee.Terrain.products function to calculate slope, aspect, and
# hillshade simultaneously. The output bands are appended to the input image.
# Hillshade is calculated based on illumination azimuth=270, elevation=45.
terrain = ee . Terrain . products ( dem )
display ( 'ee.Terrain.products bands' , terrain . bandNames ())
m . add_layer ( terrain . select ( 'hillshade' ), { 'min' : 0 , 'max' : 255 }, 'Hillshade' )
m
שליחת משוב
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0 . לפרטים, ניתן לעיין במדיניות האתר Google Developers . Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
רוצה לתת לנו משוב?
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-07-26 (שעון UTC)."],[],[]]