Skip to content

Commit

Permalink
style: delete todo notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco Muñoz committed Dec 27, 2024
1 parent 275395e commit 3b1ce3f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 22 deletions.
2 changes: 0 additions & 2 deletions geetools/ee_feature_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ def addId(
idByIndex = ee.Dictionary.fromLists(indexes, ids)
return self._obj.map(lambda f: f.set(name, idByIndex.get(f.get("system:index"))))

# TODO: Fix the example
def mergeGeometries(self, maxError: float | int | ee.Number | None = None) -> ee.Geometry:
"""Merge the geometries included in the features.
Expand Down Expand Up @@ -223,7 +222,6 @@ def mergeGeometries(self, maxError: float | int | ee.Number | None = None) -> ee
union = self._obj.iterate(lambda f, g: f.geometry().union(g, maxError=maxError), first)
return ee.Geometry(union).dissolve(maxError=maxError)

# TODO: Fix the example
def toPolygons(self) -> ee.FeatureCollection:
"""Drop any geometry that is not a Polygon or a multipolygon.
Expand Down
13 changes: 0 additions & 13 deletions geetools/ee_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,6 @@ def index_list(cls) -> dict[str, dict]:
response.raise_for_status()
return response.json()["SpectralIndices"]

# TODO: We can add the additional examples using https://eemont.readthedocs.io/en/latest/classes/stubs/eemont.imagecollection.spectralIndices.html
def spectralIndices(
self,
index: str = "NDVI",
Expand Down Expand Up @@ -1532,8 +1531,6 @@ def maskCover(
value = self.maskCoverRegion(region, scale, None, proxyValue, **kwargs)
return self._obj.set(propertyName, value)

# TODO: Update this method. It throws the following error:
# EEException: Image.load: Image asset 'COPERNICUS/S2_SR/20190828T151811_20190828T151809_T18GYT' not found (does not exist or caller does not have access).
def plot(
self,
bands: list,
Expand Down Expand Up @@ -1627,9 +1624,6 @@ def plot(

return ax

# TODO: Fix the example
# Note: the second example is even correct? It seems to fail always, the error was:
# EEException: Image.rename: Can't add a band named '2' to image because a band with this name already exists. Existing bands: [1, 2].
@classmethod
def fromList(cls, images: ee.List | list) -> ee.Image:
"""Create a single image by passing a list of images.
Expand Down Expand Up @@ -1852,7 +1846,6 @@ def byRegions(

return ee.Dictionary.fromLists(features, values)

# TODO: Fix it. Idem for plot_by_bands.
def plot_by_regions(
self,
type: str,
Expand Down Expand Up @@ -1944,11 +1937,6 @@ def plot_by_regions(

return ax

# TODO: This example throws the following error:
# AttributeError: 'Reducer' object has no attribute 'aggregate_array'
# That was thrown by the method byRegions, in the line:
# features = regions.aggregate_array(regionId)
# I think that is produced due before the method doesn't have the "type" argument
def plot_by_bands(
self,
type: str,
Expand Down Expand Up @@ -2040,7 +2028,6 @@ def plot_by_bands(

return ax

# TODO: Fix this example
def plot_hist(
self,
bins: int = 30,
Expand Down
7 changes: 0 additions & 7 deletions geetools/ee_image_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
"The javascript format to use to burn date object in GEE."


# TODO: Usually the image collection "LANDSAT/LC08/C01/T1_TOA" brings
# an error when trying to be imported. It is a future work to fix this
# issue.
@register_class_accessor(ee.ImageCollection, "geetools")
class ImageCollectionAccessor:
"""Toolbox for the :py:class:`ee.ImageCollection` class."""
Expand All @@ -36,8 +33,6 @@ def __init__(self, obj: ee.ImageCollection):
self._obj = obj

# -- ee-extra wrapper ------------------------------------------------------
# TODO: Currently (2024-12-20) there are a bug when you use this method with any S2.
# This bug is related with ee-extra, so we have to wait until they fix the bug
def maskClouds(
self,
method: str = "cloud_prob",
Expand Down Expand Up @@ -130,7 +125,6 @@ def closest(
"""
return ee_extra.ImageCollection.core.closest(self._obj, date, tolerance, unit)

# TODO: We can add the additional examples using https://eemont.readthedocs.io/en/latest/classes/stubs/eemont.imagecollection.spectralIndices.html
def spectralIndices(
self,
index: str = "NDVI",
Expand Down Expand Up @@ -1146,7 +1140,6 @@ def computeDistance(other):

return ee.Image(medoid).select(bandNames)

# TODO: Fix the example
def datesByBands(
self,
region: ee.Geometry,
Expand Down

0 comments on commit 3b1ce3f

Please sign in to comment.