Чтобы защитить общие вычислительные ресурсы и обеспечить надежную работу для всех, в Earth Engine введены
уровни квот для некоммерческого использования. Для некоммерческих проектов по умолчанию используется уровень Community, но вы можете изменить его в любое время.
ee.Dictionary.getGeometry
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Извлекает именованное значение геометрии из словаря.
| Использование | Возврат | Dictionary. getGeometry (key) | Геометрия |
| Аргумент | Тип | Подробности | это: dictionary | Словарь | |
key | Нить | |
Примеры
Редактор кода (JavaScript)
// A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).
var dict = ee.Dictionary({
B1: 182,
B2: 219,
B3: 443,
Geometry: ee.Geometry.Point([-122.01, 36.97])
});
print('The "Geometry" value as an ee.Geometry object',
dict.getGeometry('Geometry')); Настройка Python
Информацию об API Python и использовании geemap для интерактивной разработки см. на странице «Среда Python» .
import ee
import geemap.core as geemap
Colab (Python)
# A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).
dic = ee.Dictionary({
'B1': 182,
'B2': 219,
'B3': 443,
'Geometry': ee.Geometry.Point([-122.01, 36.97])
})
display('The "Geometry" value as an ee.Geometry object:',
dic.getGeometry('Geometry'))
[null,null,["Последнее обновление: 2025-10-25 UTC."],[],["The `getGeometry(key)` method retrieves a geometry object from a dictionary using a specified key. The method requires a dictionary and a string key as input. It returns a `Geometry` object, if the key `\"Geometry\"` exist, otherwise it may return `null`. Examples demonstrate retrieving the geometry using both JavaScript and Python, showcasing how to extract the geometry value associated with the `\"Geometry\"` key from a dictionary.\n"]]