ঘোষণা :
15 এপ্রিল, 2025 এর আগে আর্থ ইঞ্জিন ব্যবহার করার জন্য নিবন্ধিত সমস্ত অবাণিজ্যিক প্রকল্পগুলিকে অবশ্যই আর্থ ইঞ্জিন অ্যাক্সেস বজায় রাখার জন্য
অ-বাণিজ্যিক যোগ্যতা যাচাই করতে হবে।
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
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eCalculates the slope of a terrain in degrees using a Digital Elevation Model (DEM).\u003c/p\u003e\n"],["\u003cp\u003eUses the 4-connected neighbors of each pixel for computation, leading to missing values at image edges.\u003c/p\u003e\n"],["\u003cp\u003eOutputs a slope image with values ranging from 0 to 90 degrees, representing the steepness of the terrain.\u003c/p\u003e\n"],["\u003cp\u003eProvides examples in JavaScript and Python demonstrating slope calculation and visualization.\u003c/p\u003e\n"]]],[],null,["# ee.Terrain.slope\n\nCalculates slope in degrees from a terrain DEM.\n\n\u003cbr /\u003e\n\nThe local gradient is computed using the 4-connected neighbors of each pixel, so missing values will occur around the edges of an image.\n\n| Usage | Returns |\n|---------------------------|---------|\n| `ee.Terrain.slope(input)` | Image |\n\n| Argument | Type | Details |\n|----------|-------|--------------------------------|\n| `input` | Image | An elevation image, in meters. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// A digital elevation model.\nvar dem = ee.Image('NASA/NASADEM_HGT/001').select('elevation');\n\n// Calculate slope. Units are degrees, range is [0,90).\nvar slope = ee.Terrain.slope(dem);\n\n// Calculate aspect. Units are degrees where 0=N, 90=E, 180=S, 270=W.\nvar aspect = ee.Terrain.aspect(dem);\n\n// Display slope and aspect layers on the map.\nMap.setCenter(-123.457, 47.815, 11);\nMap.addLayer(slope, {min: 0, max: 89.99}, 'Slope');\nMap.addLayer(aspect, {min: 0, max: 359.99}, 'Aspect');\n\n// Use the ee.Terrain.products function to calculate slope, aspect, and\n// hillshade simultaneously. The output bands are appended to the input image.\n// Hillshade is calculated based on illumination azimuth=270, elevation=45.\nvar terrain = ee.Terrain.products(dem);\nprint('ee.Terrain.products bands', terrain.bandNames());\nMap.addLayer(terrain.select('hillshade'), {min: 0, max: 255}, 'Hillshade');\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\n# A digital elevation model.\ndem = ee.Image('NASA/NASADEM_HGT/001').select('elevation')\n\n# Calculate slope. Units are degrees, range is [0,90).\nslope = ee.Terrain.slope(dem)\n\n# Calculate aspect. Units are degrees where 0=N, 90=E, 180=S, 270=W.\naspect = ee.Terrain.aspect(dem)\n\n# Display slope and aspect layers on the map.\nm = geemap.Map()\nm.set_center(-123.457, 47.815, 11)\nm.add_layer(slope, {'min': 0, 'max': 89.99}, 'Slope')\nm.add_layer(aspect, {'min': 0, 'max': 359.99}, 'Aspect')\n\n# Use the ee.Terrain.products function to calculate slope, aspect, and\n# hillshade simultaneously. The output bands are appended to the input image.\n# Hillshade is calculated based on illumination azimuth=270, elevation=45.\nterrain = ee.Terrain.products(dem)\ndisplay('ee.Terrain.products bands', terrain.bandNames())\nm.add_layer(terrain.select('hillshade'), {'min': 0, 'max': 255}, 'Hillshade')\nm\n```"]]