geetools.Feature#

Toolbox for the ee.Feature class.

Classes#

FeatureAccessor

Toolbox for the ee.Feature class.

Package Contents#

class geetools.Feature.FeatureAccessor(obj)[source]#

Toolbox for the ee.Feature class.

Initialize the class.

Parameters:

obj (ee.Feature)

toFeatureCollection()[source]#

Convert a feature composed of a multiGeometry geometry into a FEatureCollection.

Returns:

The FeatureCollection

Return type:

ee.FeatureCollection

Example

import ee
import geetools

ee.Initialize()

geoms = ee.Geometry.MultiPoint([[0,0], [0,1]])
feature = ee.Feature(geoms).set("foo", "bar")
fc = feature.geetools.toFeatureCollection()
print(fc.size().getInfo())