Layout of the extensions#
Overview#
This section is a glossary of all the methods that are added to ee objects by the extension.
They are gathered by sections and link to the API reference for detailed examples but give a good overview of what can be done.
If you search for a method in the package, note that we decided to use names that are meaningful for python users so if you know what you are looking for in rasterio, pandas or numpy you should be able to find it here under the same name.
Warning
Method that were replaced during refactoring or that are still not reimplemented are not listed here. They remain fully accecible in the geetools package. If they raise a deprecation warning, it means that they are still available but will be removed in the future by their extension equivalent.
Earth Engine classes#
ee.Array#
constructor#
full: Create an :py:class:`ee.Array` with the given dimensions, initialized to the given value.
data manipulation#
set: Set the value of a cell in an array.
ee.Authenticate#
new_user: Authenticate the user and save the credentials in a specific folder.delete_user: Delete a user credential file.list_user: return all the available users in the set folder.rename_user: Rename a user without changing the credentials.
ee.ComputedObject#
The ee.ComputedObject is the base object of all API object. The methods added here can thus be used in every object of the API.
That’s also the only Object where the methods are directly added as members without the need to call geetools before.
Types management#
isInstance: Return 1 if the element is the passed type or 0 if not.
save json representations#
ee.Date#
Constructors#
Extra operations#
getUnitSinceEpoch: Get the number of units since epoch (1970-01-01).isLeap: Check if the year of the date is a leap year.
Exportation#
Warning
As the snake case suggests, this method is client side.
to_datetime: Convert a :py:class:`ee.Date` to a :py:class:`datetime.datetime`.
helper#
check_unit: Check if the provided value is a valid time unit.
ee.DateRange#
Extra operations#
split: Convert a :py:class:`ee.DateRange` to a list of :py:class:`ee.DateRange`.
Helper#
check_unit: Check if the unit is valid.unitMillis: Get the milliseconds of a unit.
ee.Dictionary#
Constructors#
fromPairs: Create a dictionary from a list of ``[[key, value], …]]`` pairs.
Extra operations#
ee.Feature#
toFeatureCollection: Convert a :py:class:`ee.Feature` composed of a multiGeometry geometry into a :py:class:`ee.FeatureCollection`.removeProperties: Remove properties from a feature.
ee.FeatureCollection#
Properties management#
addId: Add a unique numeric identifier, starting from parameter ``start``.
Geometry management#
mergeGeometries: Merge the geometries included in the features.toPolygons: Drop any geometry that is not a Polygon or a multipolygon.
Converter#
toImage: Paint the current :py:class:`ee.FeatureCollection` to an Image.byFeatures: Get a dictionary with all property values for each feature.byProperties: Get a dictionary with all feature values for each property.
Plotting#
plot_by_features: Plot the values of a :py:class:`ee.FeatureCollection` by feature.plot_by_properties: Plot the values of a :py:class:`ee.FeatureCollection` by property.plot_hist: Plot the histogram of a specific property.
ee.Filter#
dateRange: Filter by daterange.
ee.Geometry#
keepType: Only keep the geometries of the given type from a GeometryCollection.
ee.Image#
Constructor#
Band manipulation#
addDate: Add a band with the date of the image in the provided format.addSuffix: Add a suffix to the image selected band.addPrefix: Add a prefix to the image selected band.rename: Rename the bands of the image based on a dictionary.remove: Remove bands from the image.doyToDate: Convert the DOY band to a date band.negativeClip: The opposite of the clip method.gauss: Apply a gaussian filter to the image.repeat: Repeat a band of the image.
Data extraction#
getValues: Get the value of the image at the given point using specified geometry.minScale: Return the minimum scale of the image.reduceBands: Reduce the image using the selected reducer and adding the result as a band using the selected name.format: Create a string from using the given pattern and using the image properties.index_list: Return the list of indices implemented in this module.spectralIndices: Computes one or more spectral indices (indices are added as bands) for an image from the Awesome List of Spectral Indices.getScaleParams: Gets the scale parameters for each band of the image.getOffsetParams: Gets the offset parameters for each band of the image.getSTAC: Gets the STAC of the image.getDOI: Gets the DOI of the image, if available.getCitation: Gets the citation of the image, if available.
Data manipulation#
doyToDate: Convert the DOY band to a date band.clipOnCollection: Clip an image to a :py:class:`ee.FeatureCollection`.bufferMask: Make a buffer around every masked pixel of the Image.removeZeros: Return an image array with non-zero values extracted from each band.interpolateBands: Interpolate bands from the ``src`` value range to the ``to`` value range.isletMask: Compute the islet mask from an image.scaleAndOffset: Scales bands on an image according to their scale and offset parameters.preprocess: Pre-processes the image: masks clouds and shadows, and scales and offsets the image.panSharpen: Apply panchromatic sharpening to the Image.tasseledCap: Calculates tasseled cap brightness, wetness, and greenness components.matchHistogram: Adjust the image’s histogram to match a target image.maskClouds: Masks clouds and shadows in an image (valid just for Surface Reflectance products).
Converter#
toGrid: Convert an image to a grid of polygons.
Properties#
removeProperties: Remove a list of properties from an image.
ee.ImageCollection#
Data manipulation#
maskClouds: Masks clouds and shadows in each image of an :py:class:`ee.ImageCollection` (valid just for Surface Reflectance products).closest: Gets the closest image (or set of images if the collection intersects a region that requires multiple scenes) to the specified date.scaleAndOffset: Scales bands on an image according to their scale and offset parameters.preprocess: Pre-processes the image: masks clouds and shadows, and scales and offsets the image collection.panSharpen: Apply panchromatic sharpening to the :py:class:`ee.ImageCollection` images.tasseledCap: Calculates tasseled cap brightness, wetness, and greenness components for all images in the collection.append: Append an image to the existing image collection.outliers: Compute the outlier for each pixel in the specified bands.
Data extraction#
spectralIndices: Computes one or more spectral indices (indices are added as bands) for an image collection from the Awesome List of Spectral Indices.getScaleParams: Gets the scale parameters for each band of the image.getOffsetParams: Gets the offset parameters for each band of the image.getDOI: Gets the DOI of the collection, if available.getCitation: Gets the citation of the image, if available.getSTAC: Gets the STAC of the image collection.collectionMask: A binary :py:class:`ee.Image` where only pixels that are masked in all images of the collection get masked.iloc: Get Image from the :py:class:`ee.ImageCollection` by index.integral: Compute the integral of a band over time or a specified property.aggregateArray: Aggregate the :py:class:`ee.ImageCollection` selected properties into a dictionary.validPixel: Compute the number of valid pixels in the specified band.
Filter#
containsBandNames: Filter the :py:class:`ee.ImageCollection` by band names using the provided filter.containsAllBands: Filter the :py:class:`ee.ImageCollection` keeping only the images with all the provided bands.containsAnyBands: Filter the :py:class:`ee.ImageCollection` keeping only the images with any of the provided bands.
Converter#
to_xarray: Open an Earth Engine :py:class:`ee.ImageCollection` as an ``xarray.Dataset``.
ee.Initialize#
from_user: Initialize Earthengine API using a specific user.project_id: Get the project_id of the current account.
ee.Join#
byProperty: Join 2 collections by a given property field.
ee.List#
Constructor#
operations#
product: Compute the cartesian product of 2 list.complement: Compute the complement of the current list and the ``other`` list.intersection: Compute the intersection of the current list and the ``other`` list.union: Compute the union of the current list and the ``other`` list.delete: Delete an element from a list.replaceMany: Replace many values in a list.
Converter#
ee.Number#
truncate: Truncate a number to a given number of decimals.
ee.String#
Added classes#
ee.Float#
Note
This object does not exist in the original API. It is a custom Placeholder Float class to be used in the ee.ComputedObject.isInstance() method.
ee.Integer#
Note
This object does not exist in the original API. It is a custom Placeholder Float class to be used in the ee.ComputedObject.isInstance() method.
ee.Asset#
Note
This object is overriding most of the pathlib methods. We are simply gathering them here for convenience.
Constructor#
home: Return the root asset folder of the used cloud project.
Operation#
as_posix: Return the asset id as a posix path.as_uri: Return the asset id as an uri.is_absolute: Return True if the asset is absolute.is_user_project: Check if the current asset is in the same project as the user.expanduser: Return a new path with expanded ~ constructs.exists: Return True if the asset exists and/or the user has access to it.is_relative_to: Return True if the asset is relative to another asset.joinpath: Join the asset with other paths.match: Return True if the asset matches the patterns.with_name: Return the asset with the given name.is_image: Return ``True`` if the asset is an image.is_image_collection: Return ``True`` if the asset is an image collection.is_feature_collection: Return ``True`` if the asset is a feature collection.is_folder: Return ``True`` if the asset is a folder.is_project: Return ``True`` if the asset is a project.is_type: Return ``True`` if the asset is of the specified type.iterdir: Get the list of children of a container.mkdir: Create a container asset from the Asset path.move: Move the asset to a target destination.rmdir: ``delete`` alias for containers.unlink: ``delete`` alias for singular assets.delete: Remove the asset.copy: Copy the asset to a target destination.glob: Return a list of assets matching the pattern.rglob: Return a list of assets matching the pattern recursively.setProperties: Set properties of the asset.
Property#
ee.Asset.parts not found
ee.Asset.parent not found
ee.Asset.parents not found
ee.Asset.name not found
ee.Asset.st_size not found
ee.Asset.type not found
ee.Asset.owner not found