Skip to content

Commit

Permalink
imagecollection.py: Add static count method.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 687410913
  • Loading branch information
schwehr authored and Google Earth Engine Authors committed Oct 18, 2024
1 parent 24ebc84 commit 18d6ee2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion python/ee/imagecollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,15 @@ def And(self) -> image.Image:

return apifunction.ApiFunction.call_(REDUCE_PREFIX + '.and', self)

# count comes from Collection, not reduce.count.
def count(self) -> image.Image:
"""Returns an image with the number of images in the collection.
Reduces an image collection by calculating the number of images with a valid
mask at each pixel across the stack of all matching bands. Bands are matched
by name.
"""

return apifunction.ApiFunction.call_(REDUCE_PREFIX + '.count', self)

def max(self) -> image.Image:
"""Returns an image with the maximum value of the collection.
Expand Down

0 comments on commit 18d6ee2

Please sign in to comment.