Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
ee.FeatureCollection.toDictionary
Stay organized with collections
Save and categorize content based on your preferences.
Extract properties from a feature as a dictionary.
Usage | Returns | FeatureCollection.toDictionary(properties) | Dictionary |
Argument | Type | Details | this: element | Element | The feature to extract the property from. |
properties | List, default: null | The list of properties to extract. Defaults to all non-system properties. |
Examples
Code Editor (JavaScript)
// FeatureCollection of power plants.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants');
print('All non-system FeatureCollection properties as an ee.Dictionary',
fc.toDictionary());
print('Selected properties as an ee.Dictionary',
fc.toDictionary(['description', 'provider']));
Python setup
See the
Python Environment page for information on the Python API and using
geemap
for interactive development.
import ee
import geemap.core as geemap
Colab (Python)
# FeatureCollection of power plants.
fc = ee.FeatureCollection('WRI/GPPD/power_plants')
print('All non-system FeatureCollection properties as an ee.Dictionary:',
fc.toDictionary().getInfo())
print('Selected properties as an ee.Dictionary:',
fc.toDictionary(['description', 'provider']).getInfo())
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-13 UTC.
[null,null,["Last updated 2024-07-13 UTC."],[[["\u003cp\u003eThe \u003ccode\u003etoDictionary()\u003c/code\u003e function extracts properties from an Earth Engine Feature or FeatureCollection and returns them as a dictionary.\u003c/p\u003e\n"],["\u003cp\u003eBy default, \u003ccode\u003etoDictionary()\u003c/code\u003e extracts all non-system properties; you can also specify a list of properties to extract.\u003c/p\u003e\n"],["\u003cp\u003eThis function is available for both the JavaScript and Python Earth Engine APIs.\u003c/p\u003e\n"],["\u003cp\u003eThe extracted dictionary can be printed or further processed using Earth Engine methods or your preferred scripting language.\u003c/p\u003e\n"]]],[],null,["# ee.FeatureCollection.toDictionary\n\nExtract properties from a feature as a dictionary.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|--------------------------------------------------|------------|\n| FeatureCollection.toDictionary`(`*properties*`)` | Dictionary |\n\n| Argument | Type | Details |\n|-----------------|---------------------|---------------------------------------------------------------------------|\n| this: `element` | Element | The feature to extract the property from. |\n| `properties` | List, default: null | The list of properties to extract. Defaults to all non-system properties. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// FeatureCollection of power plants.\nvar fc = ee.FeatureCollection('WRI/GPPD/power_plants');\n\nprint('All non-system FeatureCollection properties as an ee.Dictionary',\n fc.toDictionary());\nprint('Selected properties as an ee.Dictionary',\n fc.toDictionary(['description', 'provider']));\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# FeatureCollection of power plants.\nfc = ee.FeatureCollection('WRI/GPPD/power_plants')\n\nprint('All non-system FeatureCollection properties as an ee.Dictionary:',\n fc.toDictionary().getInfo())\nprint('Selected properties as an ee.Dictionary:',\n fc.toDictionary(['description', 'provider']).getInfo())\n```"]]