geetools.Feature#

Toolbox for the ee.Feature class.

Package Contents#

Classes#

FeatureAccessor

Toolbox for the ee.Feature class.

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

Toolbox for the ee.Feature class.

Initialize the class.

Parameters:

obj (ee.Feature) –

removeProperties(properties)[source]#

Remove properties from a feature.

Parameters:

properties (geetools.types.ee_list) – List of properties to remove

Returns:

The feature without the properties

Return type:

ee.Feature

Example

import ee
import geetools

ee.Initialize()

feature = ee.Feature(None).set("foo", "bar", "baz", "foo")
feature = feature.geetools.removeProperties(["foo"])
print(feature.getInfo())
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())