Earth Engine вводит
квоты для некоммерческих проектов , чтобы защитить совместно используемые вычислительные ресурсы и обеспечить надежную работу для всех. Все некоммерческие проекты должны выбрать уровень квот до
27 апреля 2026 года , иначе по умолчанию будет использоваться уровень «Сообщество». Квоты вступят в силу для всех проектов (независимо от даты выбора уровня)
27 апреля 2026 года .
Подробнее.
Отправить отзыв
ee.ImageCollection.toDictionary
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Извлечь свойства из объекта в виде словаря.
Использование Возврат ImageCollection. toDictionary ( properties ) Словарь
Аргумент Тип Подробности это: element Элемент Функция, из которой необходимо извлечь свойство. properties Список, по умолчанию: null Список свойств для извлечения. По умолчанию — все несистемные свойства.
Примеры Редактор кода (JavaScript)
// A contrived, empty image collection for simple demonstration.
var col = ee . ImageCollection ([]);
print ( 'Collection without properties' , col );
// Set collection properties using a dictionary.
col = col . set ({
project_name : 'biomass_tracking' ,
project_id : 3 ,
plot_ids : ee . Array ([ 7 , 11 , 20 ])
});
// Set collection properties using a series of key-value pairs.
col = col . set ( 'project_year' , 2018 ,
'rgb_vis' , 'false_color' );
print ( 'Collection with properties' , col );
// Get a dictionary of collection property keys and values.
print ( 'Property keys and values (ee.Dictionary)' , col . toDictionary ());
// Get the value of a collection property. To use the result of
// ee.ImageCollection.get in further computation, you need to cast it to the
// appropriate class, for example, ee.Number(result) or ee.String(result).
print ( 'Project ID (ambiguous object)' , col . get ( 'project_id' ));
// Get the value of a string collection property as an ee.String object.
print ( 'Project name (ee.String)' , col . getString ( 'project_name' ));
// Get the value of a numeric collection property as an ee.Number object.
print ( 'Project year (ee.Number)' , col . getNumber ( 'project_year' ));
// Get the value of an ee.Array collection property as an ee.Array object.
print ( 'Plot IDs (ee.Array)' , col . getArray ( 'plot_ids' )); Настройка Python
Информацию об API Python и использовании geemap для интерактивной разработки см. на странице «Среда Python» .
import ee
import geemap.core as geemap Colab (Python)
# A contrived, empty image collection for simple demonstration.
col = ee . ImageCollection ([])
display ( 'Collection without properties:' , col )
# Set collection properties using a dictionary.
col = col . set ({
'project_name' : 'biomass_tracking' ,
'project_id' : 3 ,
'plot_ids' : ee . Array ([ 7 , 11 , 20 ])
})
# Set collection properties using a series of key-value pairs.
col = col . set ( 'project_year' , 2018 ,
'rgb_vis' , 'false_color' )
display ( 'Collection with properties:' , col )
# Get a dictionary of collection property keys and values.
display ( 'Property keys and values (ee.Dictionary):' , col . toDictionary ())
# Get the value of a collection property. To use the result of
# ee.ImageCollection.get in further computation, you need to cast it to the
# appropriate class, for example, ee.Number(result) or ee.String(result).
display ( 'Project ID (ambiguous object):' , col . get ( 'project_id' ))
# Get the value of a string collection property as an ee.String object.
display ( 'Project name (ee.String):' , col . getString ( 'project_name' ))
# Get the value of a numeric collection property as an ee.Number object.
display ( 'Project year (ee.Number):' , col . getNumber ( 'project_year' ))
# Get the value of an ee.Array collection property as an ee.Array object.
display ( 'Plot IDs (ee.Array):' , col . getArray ( 'plot_ids' )) ,Извлечь свойства из объекта в виде словаря.
Использование Возврат ImageCollection. toDictionary ( properties ) Словарь
Аргумент Тип Подробности это: element Элемент Функция, из которой необходимо извлечь свойство. properties Список, по умолчанию: null Список свойств для извлечения. По умолчанию — все несистемные свойства.
Примеры Редактор кода (JavaScript)
// A contrived, empty image collection for simple demonstration.
var col = ee . ImageCollection ([]);
print ( 'Collection without properties' , col );
// Set collection properties using a dictionary.
col = col . set ({
project_name : 'biomass_tracking' ,
project_id : 3 ,
plot_ids : ee . Array ([ 7 , 11 , 20 ])
});
// Set collection properties using a series of key-value pairs.
col = col . set ( 'project_year' , 2018 ,
'rgb_vis' , 'false_color' );
print ( 'Collection with properties' , col );
// Get a dictionary of collection property keys and values.
print ( 'Property keys and values (ee.Dictionary)' , col . toDictionary ());
// Get the value of a collection property. To use the result of
// ee.ImageCollection.get in further computation, you need to cast it to the
// appropriate class, for example, ee.Number(result) or ee.String(result).
print ( 'Project ID (ambiguous object)' , col . get ( 'project_id' ));
// Get the value of a string collection property as an ee.String object.
print ( 'Project name (ee.String)' , col . getString ( 'project_name' ));
// Get the value of a numeric collection property as an ee.Number object.
print ( 'Project year (ee.Number)' , col . getNumber ( 'project_year' ));
// Get the value of an ee.Array collection property as an ee.Array object.
print ( 'Plot IDs (ee.Array)' , col . getArray ( 'plot_ids' )); Настройка Python
Информацию об API Python и использовании geemap для интерактивной разработки см. на странице «Среда Python» .
import ee
import geemap.core as geemap Colab (Python)
# A contrived, empty image collection for simple demonstration.
col = ee . ImageCollection ([])
display ( 'Collection without properties:' , col )
# Set collection properties using a dictionary.
col = col . set ({
'project_name' : 'biomass_tracking' ,
'project_id' : 3 ,
'plot_ids' : ee . Array ([ 7 , 11 , 20 ])
})
# Set collection properties using a series of key-value pairs.
col = col . set ( 'project_year' , 2018 ,
'rgb_vis' , 'false_color' )
display ( 'Collection with properties:' , col )
# Get a dictionary of collection property keys and values.
display ( 'Property keys and values (ee.Dictionary):' , col . toDictionary ())
# Get the value of a collection property. To use the result of
# ee.ImageCollection.get in further computation, you need to cast it to the
# appropriate class, for example, ee.Number(result) or ee.String(result).
display ( 'Project ID (ambiguous object):' , col . get ( 'project_id' ))
# Get the value of a string collection property as an ee.String object.
display ( 'Project name (ee.String):' , col . getString ( 'project_name' ))
# Get the value of a numeric collection property as an ee.Number object.
display ( 'Project year (ee.Number):' , col . getNumber ( 'project_year' ))
# Get the value of an ee.Array collection property as an ee.Array object.
display ( 'Plot IDs (ee.Array):' , col . getArray ( 'plot_ids' ))
Отправить отзыв
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0" , а примеры кода – по лицензии Apache 2.0 . Подробнее об этом написано в правилах сайта . Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2025-10-30 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-10-30 UTC."],[],["The `ImageCollection.toDictionary()` method extracts properties from a feature, returning them as a dictionary. You must provide a list of `properties`; otherwise, it will default to all non-system properties. Properties can be added to an image collection with `set()`. Individual property values can be retrieved using `get()`, `getString()`, `getNumber()`, or `getArray()`, and then must be cast into the appropriate data type.\n"]]