geetools.tools._deprecated_imagecollection
#
legacy Module holding tools for ee.ImageCollections.
Module Contents#
Functions#
|
Add an Image to the Collection. |
|
Aggregate array in all images and return a list of dicts. |
|
Get a mask which indicates pixels that are masked in all images (0) from the others |
|
Compute the area under the curve taking the x axis from an image property. |
|
Filter a collection with images containing all bands specified in. |
|
Filter a collection with images cotaining any of the bands specified in. |
|
Convert data coming from tools.imagecollection.get_values to a pandas DataFrame. |
|
Missing docstring. |
|
Simple enumeration of features inside a collection. Each feature stores. |
|
Fill each masked pixels with the last available not masked pixel. If reverse, it goes backwards. |
|
Compute a Gauss function using a specified band over an. |
|
Compute a Gauss function using a specified property over an. |
|
Get the ID of an ImageCollection. |
|
Get an Image using its collection index. |
|
Return all values of all bands of an image collection in the. |
|
Apply a linear function over the bands across every image of the. |
|
Apply a linear function over the properties across every image of the. |
|
TODO missing docstring. |
|
Make day intervals. |
|
Make a list of image collections filtered by the given interval. |
|
Return an image with the percentage of masked pixels. 100% means all. |
|
Merge the geometries of many images. Return ee.Geometry. |
|
Return a collection where images from the same day are mosaicked. |
|
Compute the moving average over a time series. |
|
Compute a normal distribution using a specified band, over an. |
|
Compute a normal distribution using a specified property, over an. |
|
Compute outliers in the collection |
|
Parametrize a property. |
|
Reduce Day Intervals. |
|
Reduce an ImageCollection into a new one that has one image per. |
|
Convert an ImageCollection into an Image |
|
Wrap a function and its arguments into a mapping function for ImageCollection |
- geetools.tools._deprecated_imagecollection.add(collection, image)[source]#
Add an Image to the Collection.
- geetools.tools._deprecated_imagecollection.aggregate_array_all(collection)[source]#
Aggregate array in all images and return a list of dicts.
- geetools.tools._deprecated_imagecollection.allMasked(collection)[source]#
Get a mask which indicates pixels that are masked in all images (0) from the others
- geetools.tools._deprecated_imagecollection.area_under_curve(collection, band, x_property='system:time_start', name='under_curve')[source]#
Compute the area under the curve taking the x axis from an image property.
- geetools.tools._deprecated_imagecollection.containsAllBands(collection, bands)[source]#
Filter a collection with images containing all bands specified in.
parameter bands .
- geetools.tools._deprecated_imagecollection.containsAnyBand(collection, bands)[source]#
Filter a collection with images cotaining any of the bands specified in.
parameter bands .
- geetools.tools._deprecated_imagecollection.data2pandas(data)[source]#
Convert data coming from tools.imagecollection.get_values to a pandas DataFrame.
- geetools.tools._deprecated_imagecollection.enumerateProperty(collection, name='enumeration')[source]#
Missing docstring.
- Parameters:
collection –
name –
- Returns:
- geetools.tools._deprecated_imagecollection.enumerateSimple(collection, name='ENUM')[source]#
Simple enumeration of features inside a collection. Each feature stores.
its enumeration, so if the order of features changes over time, the numbers will not be in order .
- geetools.tools._deprecated_imagecollection.fillWithLast(collection, reverse=False, proxy=-999)[source]#
Fill each masked pixels with the last available not masked pixel. If reverse, it goes backwards.
Images must contain a valid date (system:time_start property by default) .
- geetools.tools._deprecated_imagecollection.gaussFunctionBand(collection, band, range_min=None, range_max=None, mean=0, output_min=None, output_max=1, std=None, stretch=1, name='gauss')[source]#
Compute a Gauss function using a specified band over an.
ImageCollection. See: https://en.wikipedia.org/wiki/Gaussian_function.
- Parameters:
band (str) – the name of the band to use
range_min – the minimum pixel value in the parsed band. If None, it will be computed
range_max – the maximum pixel value in the parsed band. If None, it will be computed
mean (int or float) – the position of the center of the peak. Defaults to 0
std (int or float) – the standard deviation value. Defaults to range/4
output_max (int or float) – height of the curve’s peak
output_min (int or float) – the desired minimum of the curve
stretch (int or float) – a stretching value. As bigger as stretch
name – the name of the resulting band
- Returns:
the parsed collection in which every image will have an extra band that results of applying the gauss function over every pixel in the image
- Return type:
ee.ImageCollection
- geetools.tools._deprecated_imagecollection.gaussFunctionProperty(collection, property, range_min=None, range_max=None, mean=0, output_min=None, output_max=1, std=None, stretch=1, name='GAUSS')[source]#
Compute a Gauss function using a specified property over an.
ImageCollection. See: https://en.wikipedia.org/wiki/Gaussian_function.
- Parameters:
collection (ee.ImageCollection) –
property (str) – the name of the property to use
range_min – the minimum pixel value in the parsed band. If None, it will be computed
range_max – the maximum pixel value in the parsed band. If None, it will be computed
mean (int or float) – the position of the center of the peak. Defaults to 0
std (int or float) – the standard deviation value. Defaults to range/4
output_max (int or float) – height of the curve’s peak
output_min (int or float) – the desired minimum of the curve
stretch (int or float) – a stretching value. As bigger as stretch
name – the name of the resulting property
- Returns:
the parsed collection in which every image will have an extra property that results of applying the linear function over every pixel in the image
- Return type:
ee.ImageCollection
- geetools.tools._deprecated_imagecollection.getId(collection)[source]#
Get the ID of an ImageCollection.
- geetools.tools._deprecated_imagecollection.getImage(collection, index)[source]#
Get an Image using its collection index.
- geetools.tools._deprecated_imagecollection.getValues(collection, geometry, scale=None, reducer=None, id='system:index', properties=None, side='server', maxPixels=10000000.0, bestEffort=False, tileScale=1)[source]#
Return all values of all bands of an image collection in the.
specified geometry.
- Parameters:
geometry (ee.Geometry) – Point from where to get the info
scale (int) – The scale to use in the reducer. It defaults to 10 due to the minimum scale available in EE (Sentinel 10m)
id (str) – image property that will be the key in the result dict
properties (list) – image properties that will be added to the resulting dict
side (str) – ‘server’ or ‘client’ side
- Returns:
Values of all bands in the point
- Return type:
dict
- geetools.tools._deprecated_imagecollection.linearFunctionBand(collection, band, range_min=None, range_max=None, mean=None, output_min=None, output_max=None, name='linear_function')[source]#
Apply a linear function over the bands across every image of the.
ImageCollection using the following formula:
a = abs(val-mean)
b = output_max-output_min
c = abs(range_max-mean)
d = abs(range_min-mean)
e = max(c, d)
f(x) = a*(-1)*(b/e)+output_max
- Parameters:
band – the band to process
range_min – the minimum pixel value in the parsed band. If None, it will be computed reducing the collection
range_max – the maximum pixel value in the parsed band. If None, it will be computed reducing the collection
output_min – the minimum value that will take the resulting band.
output_max – the minimum value that will take the resulting band.
mean – the value on the given range that will take the output_max value
name – the name of the resulting band
- Returns:
the parsed collection in which every image will have an extra band that results of applying the linear function over every pixel in the image
- Return type:
ee.ImageCollection
- geetools.tools._deprecated_imagecollection.linearFunctionProperty(collection, property, range_min=None, range_max=None, mean=None, output_min=None, output_max=None, name='LINEAR_FUNCTION')[source]#
Apply a linear function over the properties across every image of the.
ImageCollection using the following formula:
a = abs(val-mean)
b = output_max-output_min
c = abs(range_max-mean)
d = abs(range_min-mean)
e = max(c, d)
f(x) = a*(-1)*(b/e)+output_max
- Parameters:
property – the property to process
range_min – the minimum pixel value in the parsed band. If None, it will be computed reducing the collection
range_max – the maximum pixel value in the parsed band. If None, it will be computed reducing the collection
output_min – the minimum value that will take the resulting band.
output_max – the minimum value that will take the resulting band.
mean – the value on the given range that will take the output_max value
name – the name of the resulting band
- Returns:
the parsed collection in which every image will have an extra property that results of applying the linear function over every pixel in the image
- Return type:
ee.ImageCollection
- geetools.tools._deprecated_imagecollection.linearInterpolation(collection, date_property='system:time_start')[source]#
TODO missing docstring.
- geetools.tools._deprecated_imagecollection.makeDayIntervals(collection, interval=30, reverse=False, buffer='second')[source]#
Make day intervals.
- geetools.tools._deprecated_imagecollection.makeEqualInterval(collection, interval=1, unit='month')[source]#
Make a list of image collections filtered by the given interval.
for example, one month. Starts from the end of the parsed collection.
- Parameters:
collection (ee.ImageCollection) – the collection
interval (int) – the interval
unit – unit of the interval. Can be ‘day’, ‘month’, ‘year’
- Return type:
ee.List
- geetools.tools._deprecated_imagecollection.maskedSize(collection)[source]#
Return an image with the percentage of masked pixels. 100% means all.
pixels are masked .
- geetools.tools._deprecated_imagecollection.mergeGeometries(collection)[source]#
Merge the geometries of many images. Return ee.Geometry.
- geetools.tools._deprecated_imagecollection.mosaicSameDay(collection, qualityBand=None)[source]#
Return a collection where images from the same day are mosaicked.
- Parameters:
qualityBand (str) – the band that holds the quality score for mosaiking. If None it will use the simpler mosaic() function
- Returns:
a new image collection with 1 image per day. The only property kept is system:time_start
- Return type:
ee.ImageCollection
- geetools.tools._deprecated_imagecollection.moving_average(collection, back=5, reducer=None, use_original=True)[source]#
Compute the moving average over a time series.
- Parameters:
back (int) – number of images back to use for computing the stats
reducer (ee.Reducer) – the reducer to apply. Default is ee.Reducer.mean()
use_original (bool) – if True, computes the stats over the last original values, otherwise, computes the stats over the last computed values
- geetools.tools._deprecated_imagecollection.normalDistributionBand(collection, band, mean=None, std=None, name='normal_distribution')[source]#
Compute a normal distribution using a specified band, over an.
ImageCollection. For more see: https://en.wikipedia.org/wiki/Normal_distribution.
- Parameters:
band (str) – the name of the property to use
mean (float) – the mean value. If None it will be computed from the source. defaults to None.
std (float) – the standard deviation value. If None it will be computed from the source. Defaults to None.
- geetools.tools._deprecated_imagecollection.normalDistributionProperty(collection, property, mean=None, std=None, name='NORMAL_DISTRIBUTION')[source]#
Compute a normal distribution using a specified property, over an.
ImageCollection. For more see: https://en.wikipedia.org/wiki/Normal_distribution.
- Parameters:
property (str) – the name of the property to use
mean (float) – the mean value. If None it will be computed from the source. defaults to None.
std (float) – the standard deviation value. If None it will be computed from the source. Defaults to None.
- geetools.tools._deprecated_imagecollection.outliers(collection, bands, sigma=2, updateMask=False)[source]#
Compute outliers in the collection
- geetools.tools._deprecated_imagecollection.parametrizeProperty(collection, property, range_from, range_to, pattern='{property}_PARAMETRIZED')[source]#
Parametrize a property.
- Parameters:
collection – the ImageCollection
range_from – the original property range
range_to – the desired property range
property – the name of the property
pattern – the name of the resulting property. Wherever it says ‘property’ will be replaced with the passed property.
- Returns:
the parsed collection in which every image has a new parametrized property
- geetools.tools._deprecated_imagecollection.reduceDayIntervals(collection, reducer, interval=30, reverse=False, buffer='second')[source]#
Reduce Day Intervals.
- Parameters:
reducer (function) – a function that takes as only argument a collection and returns an image
- Returns:
an image collection
- Return type:
ee.ImageCollection
- geetools.tools._deprecated_imagecollection.reduceEqualInterval(collection, interval=30, unit='day', reducer=None, start_date=None, end_date=None)[source]#
Reduce an ImageCollection into a new one that has one image per.
reduced interval, for example, one image per month.
- Parameters:
collection (ee.ImageCollection) – the collection
interval (int) – the interval to reduce
unit – unit of the interval. Can be ‘day’, ‘month’, ‘year’
reducer (ee.Reducer) – the reducer to apply where images overlap. If None, uses a median reducer
start_date (ee.Date) – fix the start date. If None, uses the date of the first image in the collection
end_date (ee.Date) – fix the end date. If None, uses the date of the last image in the collection
- Returns: