ee.Terrain.slope

একটি ভূখণ্ড DEM থেকে ডিগ্রীতে ঢাল গণনা করে।

স্থানীয় গ্রেডিয়েন্ট প্রতিটি পিক্সেলের 4-সংযুক্ত প্রতিবেশী ব্যবহার করে গণনা করা হয়, তাই একটি চিত্রের প্রান্তের চারপাশে অনুপস্থিত মানগুলি ঘটবে৷

ব্যবহার রিটার্নস
ee.Terrain.slope(input) ছবি
যুক্তি টাইপ বিস্তারিত
input ছবি একটি উচ্চতার চিত্র, মিটারে।

উদাহরণ

কোড এডিটর (জাভাস্ক্রিপ্ট)

// 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');

পাইথন সেটআপ

পাইথন এপিআই এবং ইন্টারেক্টিভ ডেভেলপমেন্টের জন্য geemap ব্যবহার করার জন্য পাইথন এনভায়রনমেন্ট পৃষ্ঠাটি দেখুন।

import ee
import geemap.core as geemap

Colab (পাইথন)

# 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