Объявление : Все некоммерческие проекты, зарегистрированные для использования Earth Engine до
15 апреля 2025 года, должны
подтвердить некоммерческое право на сохранение доступа к Earth Engine.
ee.FeatureCollection.getNumber
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Извлечь свойство из объекта.
Использование | Возврат | FeatureCollection. getNumber (property) | Число |
Аргумент | Тип | Подробности | это: object | Элемент | Функция, из которой необходимо извлечь свойство. |
property | Нить | Извлекаемое свойство. |
Примеры
Редактор кода (JavaScript)
// A FeatureCollection with a number property value.
var fc = ee.FeatureCollection([]).set('number_property', 1.5);
// Fetch the number property value as an ee.Number object.
print('Number property value as ee.Number', fc.getNumber('number_property'));
Настройка Python
Информацию об API Python и использовании geemap
для интерактивной разработки см. на странице «Среда Python» .
import ee
import geemap.core as geemap
Colab (Python)
# A FeatureCollection with a number property value.
fc = ee.FeatureCollection([]).set('number_property', 1.5)
# Fetch the number property value as an ee.Number object.
print('Number property value as ee.Number:',
fc.getNumber('number_property').getInfo())
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2025-07-24 UTC.
[null,null,["Последнее обновление: 2025-07-24 UTC."],[[["\u003cp\u003eThe \u003ccode\u003egetNumber()\u003c/code\u003e method extracts a numerical property from an Earth Engine FeatureCollection.\u003c/p\u003e\n"],["\u003cp\u003eIt takes the property name as an argument and returns the property value as an ee.Number object.\u003c/p\u003e\n"],["\u003cp\u003eThis method is useful for accessing specific numerical data stored within a FeatureCollection's properties.\u003c/p\u003e\n"]]],[],null,["# ee.FeatureCollection.getNumber\n\nExtract a property from a feature.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------------------------------|---------|\n| FeatureCollection.getNumber`(property)` | Number |\n\n| Argument | Type | Details |\n|----------------|---------|-------------------------------------------|\n| this: `object` | Element | The feature to extract the property from. |\n| `property` | String | The property to extract. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// A FeatureCollection with a number property value.\nvar fc = ee.FeatureCollection([]).set('number_property', 1.5);\n\n// Fetch the number property value as an ee.Number object.\nprint('Number property value as ee.Number', fc.getNumber('number_property'));\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 FeatureCollection with a number property value.\nfc = ee.FeatureCollection([]).set('number_property', 1.5)\n\n# Fetch the number property value as an ee.Number object.\nprint('Number property value as ee.Number:',\n fc.getNumber('number_property').getInfo())\n```"]]