toFeatureCollection#
- geetools.ee_feature.FeatureAccessor.toFeatureCollection()#
Convert a
ee.Featurecomposed of a multiGeometry geometry into aee.FeatureCollection.- Returns:
The
ee.FeatureCollection.- Return type:
Example
import ee, geetools from geetools.utils import initialize_documentation initialize_documentation() geoms = ee.Geometry.MultiPoint([[0,0], [0,1]]) feature = ee.Feature(geoms).set("foo", "bar") fc = feature.geetools.toFeatureCollection() fc.getInfo()
{'type': 'FeatureCollection', 'columns': {'foo': 'String', 'system:index': 'String'}, 'features': [{'type': 'Feature', 'geometry': {'type': 'Point', 'coordinates': [0, 0]}, 'id': '0', 'properties': {'foo': 'bar'}}, {'type': 'Feature', 'geometry': {'type': 'Point', 'coordinates': [0, 1]}, 'id': '1', 'properties': {'foo': 'bar'}}]}