ee.FeatureCollection.serialize
Returns the serialized representation of this object.
Usage | Returns |
---|
FeatureCollection.serialize(legacy) | String |
Argument | Type | Details |
---|
this: computedobject | ComputedObject | The ComputedObject instance. |
legacy | Boolean, optional | Enables legacy format. |
Examples
// FeatureCollection of power plants in Belgium.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants')
.filter('country_lg == "Belgium"');
print('Serialized representation of ee.FeatureCollection', fc.serialize());
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
# FeatureCollection of power plants in Belgium.
fc = ee.FeatureCollection('WRI/GPPD/power_plants').filter(
'country_lg == "Belgium"')
print('Serialized representation of ee.FeatureCollection:',
fc.serialize())
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 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["`serialize()` returns a string representation of a given `FeatureCollection` object."],["This method can be used with an optional `legacy` Boolean argument to enable legacy formatting."],["Example code snippets are provided in JavaScript, Python, and Colab to demonstrate the usage of `serialize()`."]]],["The `serialize()` method returns a string representation of a `FeatureCollection` object. It accepts an optional boolean argument, `legacy`, to enable a legacy format. The method is demonstrated using a `FeatureCollection` of Belgian power plants, filtered by the condition `country_lg == \"Belgium\"`. The examples show how to apply this function using both JavaScript (Code Editor) and Python (Colab) to generate a serialized string output.\n"]]