API: openeo.processes
¶
The openeo.processes
module contains building blocks and helpers
to construct so called “child callbacks” for openEO processes like
openeo.rest.datacube.DataCube.apply()
and
openeo.rest.datacube.DataCube.reduce_dimension()
,
as discussed at Callback as a callable.
Note
The contents of the openeo.processes
module is automatically compiled
from the official openEO process specifications.
Developers that want to fix bugs in, or add implementations to this
module should not touch the file directly, but instead address it in the
upstream openeo-processes repository
or in the internal tooling to generate this file.
Functions in openeo.processes
¶
The openeo.processes
module implements (at top-level)
a regular Python function for each openEO process
(not only the official stable ones, but also experimental ones in “proposal” state).
These functions can be used directly as child callback, for example as follows:
from openeo.processes import absolute, max
cube.apply(absolute)
cube.reduce_dimension(max, dimension="t")
Note how the signatures of the parent DataCube
methods
and the callback functions match up:
DataCube.apply()
expects a callback that receives a single numerical value, which corresponds to the parameter signature ofopeneo.processes.absolute()
DataCube.reduce_dimension()
expects a callback that receives an array of numerical values, which corresponds to the parameter signatureopeneo.processes.max()
- openeo.processes.absolute(x)[source]¶
Absolute value
- Parameters:
x – A number.
- Return type:
- Returns:
The computed absolute value.
See also
openeo.org documentation on process “absolute”.
- openeo.processes.add(x, y)[source]¶
Addition of two numbers
- Parameters:
x – The first summand.
y – The second summand.
- Return type:
- Returns:
The computed sum of the two numbers.
See also
openeo.org documentation on process “add”.
- openeo.processes.add_dimension(data, name, label, type=<object object>)[source]¶
Add a new dimension
- Parameters:
data – A data cube to add the dimension to.
name – Name for the dimension.
label – A dimension label.
type – The type of dimension, defaults to other.
- Return type:
- Returns:
The data cube with a newly added dimension. The new dimension has exactly one dimension label. All other dimensions remain unchanged.
See also
openeo.org documentation on process “add_dimension”.
- openeo.processes.aggregate_spatial(data, geometries, reducer, target_dimension=<object object>, context=<object object>)[source]¶
Zonal statistics for geometries
- Parameters:
data – A raster data cube. The data cube must have been reduced to only contain two spatial dimensions and a third dimension the values are aggregated for, for example the temporal dimension to get a time series. Otherwise, this process fails with the TooManyDimensions exception. The data cube implicitly gets restricted to the bounds of the geometries as if
filter_spatial()
would have been used with the same values for the corresponding parameters immediately before this process.geometries – Geometries as GeoJSON on which the aggregation will be based. Vector properties are preserved for vector data cubes and all GeoJSON Features. One value will be computed per GeoJSON Feature, Geometry or GeometryCollection. For a FeatureCollection multiple values will be computed, one value per contained Feature. For example, a single value will be computed for a MultiPolygon, but two values will be computed for a FeatureCollection containing two polygons. - For polygons, the process considers all pixels for which the point at the pixel center intersects with the corresponding polygon (as defined in the Simple Features standard by the OGC). - For points, the process considers the closest pixel center. - For lines (line strings), the process considers all the pixels whose centers are closest to at least one point on the line. Thus, pixels may be part of multiple geometries and be part of multiple aggregations. To maximize interoperability, a nested GeometryCollection should be avoided. Furthermore, a GeometryCollection composed of a single type of geometries should be avoided in favour of the corresponding multi-part type (e.g. MultiPolygon).
reducer – A reducer to be applied on all values of each geometry. A reducer is a single process such as
mean()
or a set of processes, which computes a single value for a list of values, see the category ‘reducer’ for such processes.target_dimension – The name of a new dimensions that is used to store the results. A new dimension will be created with the given name and type other (see
add_dimension()
). Defaults to the dimension name result. Fails with a TargetDimensionExists exception if a dimension with the specified name exists.context – Additional data to be passed to the reducer.
- Return type:
- Returns:
A vector data cube with the computed results and restricted to the bounds of the geometries. The computed value is used for the dimension with the name that was specified in the parameter target_dimension. The computation also stores information about the total count of pixels (valid + invalid pixels) and the number of valid pixels (see
is_valid()
) for each geometry. These values are added as a new dimension with a dimension name derived from target_dimension by adding the suffix _meta. The new dimension has the dimension labels total_count and valid_count.
See also
openeo.org documentation on process “aggregate_spatial”.
- openeo.processes.aggregate_spatial_window(data, reducer, size, boundary=<object object>, align=<object object>, context=<object object>)[source]¶
Zonal statistics for rectangular windows
- Parameters:
data – A raster data cube with exactly two horizontal spatial dimensions and an arbitrary number of additional dimensions. The process is applied to all additional dimensions individually.
reducer – A reducer to be applied on the list of values, which contain all pixels covered by the window. A reducer is a single process such as
mean()
or a set of processes, which computes a single value for a list of values, see the category ‘reducer’ for such processes.size – Window size in pixels along the horizontal spatial dimensions. The first value corresponds to the x axis, the second value corresponds to the y axis.
boundary – Behavior to apply if the number of values for the axes x and y is not a multiple of the corresponding value in the size parameter. Options are: - pad (default): pad the data cube with the no-data value null to fit the required window size. - trim: trim the data cube to fit the required window size. Set the parameter align to specifies to which corner the data is aligned to.
align – If the data requires padding or trimming (see parameter boundary), specifies to which corner of the spatial extent the data is aligned to. For example, if the data is aligned to the upper left, the process pads/trims at the lower-right.
context – Additional data to be passed to the reducer.
- Return type:
- Returns:
A data cube with the newly computed values and the same dimensions. The resolution will change depending on the chosen values for the size and boundary parameter. It usually decreases for the dimensions which have the corresponding parameter size set to values greater than 1. The dimension labels will be set to the coordinate at the center of the window. The other dimension properties (name, type and reference system) remain unchanged.
See also
openeo.org documentation on process “aggregate_spatial_window”.
- openeo.processes.aggregate_temporal(data, intervals, reducer, labels=<object object>, dimension=<object object>, context=<object object>)[source]¶
Temporal aggregations
- Parameters:
data – A data cube.
intervals – Left-closed temporal intervals, which are allowed to overlap. Each temporal interval in the array has exactly two elements: 1. The first element is the start of the temporal interval. The specified instance in time is included in the interval. 2. The second element is the end of the temporal interval. The specified instance in time is excluded from the interval. The specified temporal strings follow [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html). Although [RFC 3339 prohibits the hour to be ‘24’](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.7), this process allows the value ‘24’ for the hour of an end time in order to make it possible that left-closed time intervals can fully cover the day.
reducer – A reducer to be applied for the values contained in each interval. A reducer is a single process such as
mean()
or a set of processes, which computes a single value for a list of values, see the category ‘reducer’ for such processes. Intervals may not contain any values, which for most reducers leads to no-data (null) values by default.labels – Distinct labels for the intervals, which can contain dates and/or times. Is only required to be specified if the values for the start of the temporal intervals are not distinct and thus the default labels would not be unique. The number of labels and the number of groups need to be equal.
dimension – The name of the temporal dimension for aggregation. All data along the dimension is passed through the specified reducer. If the dimension is not set or set to null, the data cube is expected to only have one temporal dimension. Fails with a TooManyDimensions exception if it has more dimensions. Fails with a DimensionNotAvailable exception if the specified dimension does not exist.
context – Additional data to be passed to the reducer.
- Return type:
- Returns:
A new data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged, except for the resolution and dimension labels of the given temporal dimension.
See also
openeo.org documentation on process “aggregate_temporal”.
- openeo.processes.aggregate_temporal_period(data, period, reducer, dimension=<object object>, context=<object object>)[source]¶
Temporal aggregations based on calendar hierarchies
- Parameters:
data – The source data cube.
period – The time intervals to aggregate. The following pre-defined values are available: * hour: Hour of the day * day: Day of the year * week: Week of the year * dekad: Ten day periods, counted per year with three periods per month (day 1 - 10, 11 - 20 and 21 - end of month). The third dekad of the month can range from 8 to 11 days. For example, the fourth dekad is Feb, 1 - Feb, 10 each year. * month: Month of the year * season: Three month periods of the calendar seasons (December - February, March - May, June - August, September - November). * tropical-season: Six month periods of the tropical seasons (November - April, May - October). * year: Proleptic years * decade: Ten year periods ([0-to-9 decade](https://en.wikipedia.org/wiki/Decade#0-to-9_decade)), from a year ending in a 0 to the next year ending in a 9. * decade-ad: Ten year periods ([1-to-0 decade](https://en.wikipedia.org/wiki/Decade#1-to-0_decade)) better aligned with the anno Domini (AD) calendar era, from a year ending in a 1 to the next year ending in a 0.
reducer – A reducer to be applied for the values contained in each period. A reducer is a single process such as
mean()
or a set of processes, which computes a single value for a list of values, see the category ‘reducer’ for such processes. Periods may not contain any values, which for most reducers leads to no-data (null) values by default.dimension – The name of the temporal dimension for aggregation. All data along the dimension is passed through the specified reducer. If the dimension is not set or set to null, the source data cube is expected to only have one temporal dimension. Fails with a TooManyDimensions exception if it has more dimensions. Fails with a DimensionNotAvailable exception if the specified dimension does not exist.
context – Additional data to be passed to the reducer.
- Return type:
- Returns:
A new data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged, except for the resolution and dimension labels of the given temporal dimension. The specified temporal dimension has the following dimension labels (YYYY = four- digit year, MM = two-digit month, DD two-digit day of month): * hour: YYYY-MM-DD-00 - YYYY-MM- DD-23 * day: YYYY-001 - YYYY-365 * week: YYYY-01 - YYYY-52 * dekad: YYYY-00 - YYYY-36 * month: YYYY-01 - YYYY-12 * season: YYYY-djf (December - February), YYYY-mam (March - May), YYYY-jja (June - August), YYYY-son (September - November). * tropical-season: YYYY-ndjfma (November - April), YYYY-mjjaso (May - October). * year: YYYY * decade: YYY0 * decade-ad: YYY1 The dimension labels in the new data cube are complete for the whole extent of the source data cube. For example, if period is set to day and the source data cube has two dimension labels at the beginning of the year (2020-01-01) and the end of a year (2020-12-31), the process returns a data cube with 365 dimension labels (2020-001, 2020-002, …, 2020-365). In contrast, if period is set to day and the source data cube has just one dimension label 2020-01-05, the process returns a data cube with just a single dimension label (2020-005).
See also
openeo.org documentation on process “aggregate_temporal_period”.
- openeo.processes.all(data, ignore_nodata=<object object>)[source]¶
Are all of the values true?
- Parameters:
data – A set of boolean values.
ignore_nodata – Indicates whether no-data values are ignored or not and ignores them by default.
- Return type:
- Returns:
Boolean result of the logical operation.
See also
openeo.org documentation on process “all”.
- openeo.processes.and_(x, y)[source]¶
Logical AND
- Parameters:
x – A boolean value.
y – A boolean value.
- Return type:
- Returns:
Boolean result of the logical AND.
See also
openeo.org documentation on process “and_”.
- openeo.processes.anomaly(data, normals, period)[source]¶
Compute anomalies
- Parameters:
data – A data cube with exactly one temporal dimension and the following dimension labels for the given period (YYYY = four-digit year, MM = two-digit month, DD two-digit day of month): * hour: YYYY-MM-DD-00 - YYYY-MM-DD-23 * day: YYYY-001 - YYYY-365 * week: YYYY-01 - YYYY-52 * dekad: YYYY-00 - YYYY-36 * month: YYYY-01 - YYYY-12 * season: YYYY-djf (December - February), YYYY-mam (March - May), YYYY-jja (June - August), YYYY-son (September - November). * tropical-season: YYYY-ndjfma (November - April), YYYY-mjjaso (May - October). * year: YYYY * decade: YYY0 * decade-ad: YYY1 * single-period / climatology-period: Any
aggregate_temporal_period()
can compute such a data cube.normals – A data cube with normals, e.g. daily, monthly or yearly values computed from a process such as
climatological_normal()
. Must contain exactly one temporal dimension with the following dimension labels for the given period: * hour: 00 - 23 * day: 001 - 365 * week: 01 - 52 * dekad: 00 - 36 * month: 01 - 12 * season: djf (December - February), mam (March - May), jja (June - August), son (September - November) * tropical-season: ndjfma (November - April), mjjaso (May - October) * year: Four-digit year numbers * decade: Four-digit year numbers, the last digit being a 0 * decade-ad: Four-digit year numbers, the last digit being a 1 * single-period / climatology- period: A single dimension label with any name is expected.period – Specifies the time intervals available in the normals data cube. The following options are available: * hour: Hour of the day * day: Day of the year * week: Week of the year * dekad: Ten day periods, counted per year with three periods per month (day 1 - 10, 11 - 20 and 21 - end of month). The third dekad of the month can range from 8 to 11 days. For example, the fourth dekad is Feb, 1 - Feb, 10 each year. * month: Month of the year * season: Three month periods of the calendar seasons (December - February, March - May, June - August, September - November). * tropical-season: Six month periods of the tropical seasons (November - April, May - October). * year: Proleptic years * decade: Ten year periods ([0-to-9 decade](https://en.wikipedia.org/wiki/Decade#0-to-9_decade)), from a year ending in a 0 to the next year ending in a 9. * decade-ad: Ten year periods ([1-to-0 decade](https://en.wikipedia.org/wiki/Decade#1-to-0_decade)) better aligned with the anno Domini (AD) calendar era, from a year ending in a 1 to the next year ending in a 0. * single-period / climatology- period: A single period of arbitrary length
- Return type:
- Returns:
A data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged.
See also
openeo.org documentation on process “anomaly”.
- openeo.processes.any(data, ignore_nodata=<object object>)[source]¶
Is at least one value true?
- Parameters:
data – A set of boolean values.
ignore_nodata – Indicates whether no-data values are ignored or not and ignores them by default.
- Return type:
- Returns:
Boolean result of the logical operation.
See also
openeo.org documentation on process “any”.
- openeo.processes.apply(data, process, context=<object object>)[source]¶
Apply a process to each pixel
- Parameters:
data – A data cube.
process – A process that accepts and returns a single value and is applied on each individual value in the data cube. The process may consist of multiple sub-processes and could, for example, consist of processes such as
absolute()
orlinear_scale_range()
.context – Additional data to be passed to the process.
- Return type:
- Returns:
A data cube with the newly computed values and the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged.
See also
openeo.org documentation on process “apply”.
- openeo.processes.apply_dimension(data, process, dimension, target_dimension=<object object>, context=<object object>)[source]¶
Apply a process to pixels along a dimension
- Parameters:
data – A data cube.
process – Process to be applied on all pixel values. The specified process needs to accept an array and must return an array with at least one element. A process may consist of multiple sub-processes.
dimension – The name of the source dimension to apply the process on. Fails with a DimensionNotAvailable exception if the specified dimension does not exist.
target_dimension – The name of the target dimension or null (the default) to use the source dimension specified in the parameter dimension. By specifying a target dimension, the source dimension is removed. The target dimension with the specified name and the type other (see
add_dimension()
) is created, if it doesn’t exist yet.context – Additional data to be passed to the process.
- Return type:
- Returns:
A data cube with the newly computed values. All dimensions stay the same, except for the dimensions specified in corresponding parameters. There are three cases how the dimensions can change: 1. The source dimension is the target dimension: - The (number of) dimensions remain unchanged as the source dimension is the target dimension. - The source dimension properties name and type remain unchanged. - The dimension labels, the reference system and the resolution are preserved only if the number of pixel values in the source dimension is equal to the number of values computed by the process. Otherwise, all other dimension properties change as defined in the list below. 2. The source dimension is not the target dimension and the latter exists: - The number of dimensions decreases by one as the source dimension is dropped. - The target dimension properties name and type remain unchanged. All other dimension properties change as defined in the list below. 3. The source dimension is not the target dimension and the latter does not exist: - The number of dimensions remain unchanged, but the source dimension is replaced with the target dimension. - The target dimension has the specified name and the type other. All other dimension properties are set as defined in the list below. Unless otherwise stated above, for the given (target) dimension the following applies: - the number of dimension labels is equal to the number of values computed by the process, - the dimension labels are incrementing integers starting from zero, - the resolution changes, and - the reference system is undefined.
See also
openeo.org documentation on process “apply_dimension”.
- openeo.processes.apply_kernel(data, kernel, factor=<object object>, border=<object object>, replace_invalid=<object object>)[source]¶
Apply a spatial convolution with a kernel
- Parameters:
data – A data cube.
kernel – Kernel as a two-dimensional array of weights. The inner level of the nested array aligns with the x axis and the outer level aligns with the y axis. Each level of the kernel must have an uneven number of elements, otherwise the process throws a KernelDimensionsUneven exception.
factor – A factor that is multiplied to each value after the kernel has been applied. This is basically a shortcut for explicitly multiplying each value by a factor afterwards, which is often required for some kernel-based algorithms such as the Gaussian blur.
border – Determines how the data is extended when the kernel overlaps with the borders. Defaults to fill the border with zeroes. The following options are available: * numeric value - fill with a user- defined constant number n: nnnnnn|abcdefgh|nnnnnn (default, with n = 0) * replicate - repeat the value from the pixel at the border: aaaaaa|abcdefgh|hhhhhh * reflect - mirror/reflect from the border: fedcba|abcdefgh|hgfedc * reflect_pixel - mirror/reflect from the center of the pixel at the border: gfedcb|abcdefgh|gfedcb * wrap - repeat/wrap the image: cdefgh|abcdefgh|abcdef
replace_invalid – This parameter specifies the value to replace non-numerical or infinite numerical values with. By default, those values are replaced with zeroes.
- Return type:
- Returns:
A data cube with the newly computed values and the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged.
See also
openeo.org documentation on process “apply_kernel”.
- openeo.processes.apply_neighborhood(data, process, size, overlap=<object object>, context=<object object>)[source]¶
Apply a process to pixels in a n-dimensional neighborhood
- Parameters:
data – A data cube.
process – Process to be applied on all neighborhoods.
size – Neighborhood sizes along each dimension. This object maps dimension names to either a physical measure (e.g. 100 m, 10 days) or pixels (e.g. 32 pixels). For dimensions not specified, the default is to provide all values. Be aware that including all values from overly large dimensions may not be processed at once.
overlap – Overlap of neighborhoods along each dimension to avoid border effects. By default no overlap is provided. For instance a temporal dimension can add 1 month before and after a neighborhood. In the spatial dimensions, this is often a number of pixels. The overlap specified is added before and after, so an overlap of 8 pixels will add 8 pixels on both sides of the window, so 16 in total. Be aware that large overlaps increase the need for computational resources and modifying overlapping data in subsequent operations have no effect.
context – Additional data to be passed to the process.
- Return type:
- Returns:
A data cube with the newly computed values and the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged.
See also
openeo.org documentation on process “apply_neighborhood”.
- openeo.processes.arccos(x)[source]¶
Inverse cosine
- Parameters:
x – A number.
- Return type:
- Returns:
The computed angle in radians.
See also
openeo.org documentation on process “arccos”.
- openeo.processes.arcosh(x)[source]¶
Inverse hyperbolic cosine
- Parameters:
x – A number.
- Return type:
- Returns:
The computed angle in radians.
See also
openeo.org documentation on process “arcosh”.
- openeo.processes.arcsin(x)[source]¶
Inverse sine
- Parameters:
x – A number.
- Return type:
- Returns:
The computed angle in radians.
See also
openeo.org documentation on process “arcsin”.
- openeo.processes.arctan(x)[source]¶
Inverse tangent
- Parameters:
x – A number.
- Return type:
- Returns:
The computed angle in radians.
See also
openeo.org documentation on process “arctan”.
- openeo.processes.arctan2(y, x)[source]¶
Inverse tangent of two numbers
- Parameters:
y – A number to be used as the dividend.
x – A number to be used as the divisor.
- Return type:
- Returns:
The computed angle in radians.
See also
openeo.org documentation on process “arctan2”.
- openeo.processes.ard_normalized_radar_backscatter(data, elevation_model=<object object>, contributing_area=<object object>, ellipsoid_incidence_angle=<object object>, noise_removal=<object object>, options=<object object>)[source]¶
CARD4L compliant SAR NRB generation
- Parameters:
data – The source data cube containing SAR input.
elevation_model – The digital elevation model to use. Set to null (the default) to allow the back- end to choose, which will improve portability, but reduce reproducibility.
contributing_area – If set to true, a DEM-based local contributing area band named contributing_area is added. The values are given in square meters.
ellipsoid_incidence_angle – If set to true, an ellipsoidal incidence angle band named ellipsoid_incidence_angle is added. The values are given in degrees.
noise_removal – If set to false, no noise removal is applied. Defaults to true, which removes noise.
options – Proprietary options for the backscatter computations. Specifying proprietary options will reduce portability.
- Return type:
- Returns:
Backscatter values expressed as gamma0 in linear scale. In addition to the bands contributing_area and ellipsoid_incidence_angle that can optionally be added with corresponding parameters, the following bands are always added to the data cube: - mask: A data mask that indicates which values are valid (1), invalid (0) or contain no-data (null). - local_incidence_angle: A band with DEM-based local incidence angles in degrees. The data returned is CARD4L compliant with corresponding metadata.
See also
openeo.org documentation on process “ard_normalized_radar_backscatter”.
- openeo.processes.ard_surface_reflectance(data, atmospheric_correction_method, cloud_detection_method, elevation_model=<object object>, atmospheric_correction_options=<object object>, cloud_detection_options=<object object>)[source]¶
CARD4L compliant Surface Reflectance generation
- Parameters:
data – The source data cube containing multi-spectral optical top of the atmosphere (TOA) reflectances. There must be a single dimension of type bands available.
atmospheric_correction_method – The atmospheric correction method to use.
cloud_detection_method – The cloud detection method to use. Each method supports detecting different atmospheric disturbances such as clouds, cloud shadows, aerosols, haze, ozone and/or water vapour in optical imagery.
elevation_model – The digital elevation model to use. Set to null (the default) to allow the back- end to choose, which will improve portability, but reduce reproducibility.
atmospheric_correction_options – Proprietary options for the atmospheric correction method. Specifying proprietary options will reduce portability.
cloud_detection_options – Proprietary options for the cloud detection method. Specifying proprietary options will reduce portability.
- Return type:
- Returns:
Data cube containing bottom of atmosphere reflectances for each spectral band in the source data cube, with atmospheric disturbances like clouds and cloud shadows removed. No-data values (null) are directly set in the bands. Depending on the methods used, several additional bands will be added to the data cube: Data cube containing bottom of atmosphere reflectances for each spectral band in the source data cube, with atmospheric disturbances like clouds and cloud shadows removed. Depending on the methods used, several additional bands will be added to the data cube: - date (optional): Specifies per-pixel acquisition timestamps. - incomplete-testing (required): Identifies pixels with a value of 1 for which the per-pixel tests (at least saturation, cloud and cloud shadows, see CARD4L specification for details) have not all been successfully completed. Otherwise, the value is 0. - saturation (required) / saturation_{band} (optional): Indicates where pixels in the input spectral bands are saturated (1) or not (0). If the saturation is given per band, the band names are saturation_{band} with {band} being the band name from the source data cube. - cloud, shadow (both required),`aerosol`, haze, ozone, water_vapor (all optional): Indicates the probability of pixels being an atmospheric disturbance such as clouds. All bands have values between 0 (clear) and 1, which describes the probability that it is an atmospheric disturbance. - snow-ice (optional): Points to a file that indicates whether a pixel is assessed as being snow/ice (1) or not (0). All values describe the probability and must be between 0 and 1. - land-water (optional): Indicates whether a pixel is assessed as being land (1) or water (0). All values describe the probability and must be between 0 and 1. - incidence-angle (optional): Specifies per-pixel incidence angles in degrees. - azimuth (optional): Specifies per-pixel azimuth angles in degrees. - sun- azimuth: (optional): Specifies per-pixel sun azimuth angles in degrees. - sun-elevation (optional): Specifies per-pixel sun elevation angles in degrees. - terrain-shadow (optional): Indicates with a value of 1 whether a pixel is not directly illuminated due to terrain shadowing. Otherwise, the value is 0. - terrain-occlusion (optional): Indicates with a value of 1 whether a pixel is not visible to the sensor due to terrain occlusion during off-nadir viewing. Otherwise, the value is 0. - terrain-illumination (optional): Contains coefficients used for terrain illumination correction are provided for each pixel. The data returned is CARD4L compliant with corresponding metadata.
See also
openeo.org documentation on process “ard_surface_reflectance”.
- openeo.processes.array_append(data, value, label=<object object>)[source]¶
Append a value to an array
- Parameters:
data – An array.
value – Value to append to the array.
label – If the given array is a labeled array, a new label for the new value should be given. If not given or null, the array index as string is used as the label. If in any case the label exists, a LabelExists exception is thrown.
- Return type:
- Returns:
The new array with the value being appended.
See also
openeo.org documentation on process “array_append”.
- openeo.processes.array_apply(data, process, context=<object object>)[source]¶
Apply a process to each array element
- Parameters:
data – An array.
process – A process that accepts and returns a single value and is applied on each individual value in the array. The process may consist of multiple sub-processes and could, for example, consist of processes such as
absolute()
orlinear_scale_range()
.context – Additional data to be passed to the process.
- Return type:
- Returns:
An array with the newly computed values. The number of elements are the same as for the original array.
See also
openeo.org documentation on process “array_apply”.
- openeo.processes.array_concat(array1, array2)[source]¶
Merge two arrays
- Parameters:
array1 – The first array.
array2 – The second array.
- Return type:
- Returns:
The merged array.
See also
openeo.org documentation on process “array_concat”.
- openeo.processes.array_contains(data, value)[source]¶
Check whether the array contains a given value
- Parameters:
data – List to find the value in.
value – Value to find in data. If the value is null, this process returns always false.
- Return type:
- Returns:
true if the list contains the value, false` otherwise.
See also
openeo.org documentation on process “array_contains”.
- openeo.processes.array_create(data=<object object>, repeat=<object object>)[source]¶
Create an array
- Parameters:
data – A (native) array to fill the newly created array with. Defaults to an empty array.
repeat – The number of times the (native) array specified in data is repeatedly added after each other to the new array being created. Defaults to 1.
- Return type:
- Returns:
The newly created array.
See also
openeo.org documentation on process “array_create”.
- openeo.processes.array_create_labeled(data, labels)[source]¶
Create a labeled array
- Parameters:
data – An array of values to be used.
labels – An array of labels to be used.
- Return type:
- Returns:
The newly created labeled array.
See also
openeo.org documentation on process “array_create_labeled”.
- openeo.processes.array_element(data, index=<object object>, label=<object object>, return_nodata=<object object>)[source]¶
Get an element from an array
- Parameters:
data – An array.
index – The zero-based index of the element to retrieve.
label – The label of the element to retrieve. Throws an ArrayNotLabeled exception, if the given array is not a labeled array and this parameter is set.
return_nodata – By default this process throws an ArrayElementNotAvailable exception if the index or label is invalid. If you want to return null instead, set this flag to true.
- Return type:
- Returns:
The value of the requested element.
See also
openeo.org documentation on process “array_element”.
- openeo.processes.array_filter(data, condition, context=<object object>)[source]¶
Filter an array based on a condition
- Parameters:
data – An array.
condition – A condition that is evaluated against each value, index and/or label in the array. Only the array elements for which the condition returns true are preserved.
context – Additional data to be passed to the condition.
- Return type:
- Returns:
An array filtered by the specified condition. The number of elements are less than or equal compared to the original array.
See also
openeo.org documentation on process “array_filter”.
- openeo.processes.array_find(data, value, reverse=<object object>)[source]¶
Get the index for a value in an array
- Parameters:
data – List to find the value in.
value – Value to find in data. If the value is null, this process returns always null.
reverse – By default, this process finds the index of the first match. To return the index of the last match instead, set this flag to true.
- Return type:
- Returns:
The index of the first element with the specified value. If no element was found, null is returned.
See also
openeo.org documentation on process “array_find”.
- openeo.processes.array_find_label(data, label)[source]¶
Get the index for a label in a labeled array
- Parameters:
data – List to find the label in.
label – Label to find in data.
- Return type:
- Returns:
The index of the element with the specified label assigned. If no such label was found, null is returned.
See also
openeo.org documentation on process “array_find_label”.
- openeo.processes.array_interpolate_linear(data)[source]¶
One-dimensional linear interpolation for arrays
- Parameters:
data – An array of numbers and no-data values. If the given array is a labeled array, the labels must have a natural/inherent label order and the process expects the labels to be sorted accordingly. This is the default behavior in openEO for spatial and temporal dimensions.
- Return type:
- Returns:
An array with no-data values being replaced with interpolated values. If not at least 2 numerical values are available in the array, the array stays the same.
See also
openeo.org documentation on process “array_interpolate_linear”.
- openeo.processes.array_labels(data)[source]¶
Get the labels for an array
- Parameters:
data – An array.
- Return type:
- Returns:
The labels or indices as array.
See also
openeo.org documentation on process “array_labels”.
- openeo.processes.array_modify(data, values, index, length=<object object>)[source]¶
Change the content of an array (remove, insert, update)
- Parameters:
data – The array to modify.
values – The values to insert into the data array.
index – The index in the data array of the element to insert the value(s) before. If the index is greater than the number of elements in the data array, the process throws an ArrayElementNotAvailable exception. To insert after the last element, there are two options: 1. Use the simpler processes
array_append()
to append a single value orarray_concat()
to append multiple values. 2. Specify the number of elements in the array. You can retrieve the number of elements with the processcount()
, having the parameter condition set to true.length – The number of elements in the data array to remove (or replace) starting from the given index. If the array contains fewer elements, the process simply removes all elements up to the end.
- Return type:
- Returns:
An array with values added, updated or removed.
See also
openeo.org documentation on process “array_modify”.
- openeo.processes.arsinh(x)[source]¶
Inverse hyperbolic sine
- Parameters:
x – A number.
- Return type:
- Returns:
The computed angle in radians.
See also
openeo.org documentation on process “arsinh”.
- openeo.processes.artanh(x)[source]¶
Inverse hyperbolic tangent
- Parameters:
x – A number.
- Return type:
- Returns:
The computed angle in radians.
See also
openeo.org documentation on process “artanh”.
- openeo.processes.atmospheric_correction(data, method, elevation_model=<object object>, options=<object object>)[source]¶
Apply atmospheric correction
- Parameters:
data – Data cube containing multi-spectral optical top of atmosphere reflectances to be corrected.
method – The atmospheric correction method to use. To get reproducible results, you have to set a specific method. Set to null to allow the back-end to choose, which will improve portability, but reduce reproducibility as you may get different results if you run the processes multiple times.
elevation_model – The digital elevation model to use. Set to null (the default) to allow the back- end to choose, which will improve portability, but reduce reproducibility.
options – Proprietary options for the atmospheric correction method. Specifying proprietary options will reduce portability.
- Return type:
- Returns:
Data cube containing bottom of atmosphere reflectances.
See also
openeo.org documentation on process “atmospheric_correction”.
- openeo.processes.between(x, min, max, exclude_max=<object object>)[source]¶
Between comparison
- Parameters:
x – The value to check.
min – Lower boundary (inclusive) to check against.
max – Upper boundary (inclusive) to check against.
exclude_max – Exclude the upper boundary max if set to true. Defaults to false.
- Return type:
- Returns:
true if x is between the specified bounds, otherwise false.
See also
openeo.org documentation on process “between”.
- openeo.processes.ceil(x)[source]¶
Round fractions up
- Parameters:
x – A number to round up.
- Return type:
- Returns:
The number rounded up.
See also
openeo.org documentation on process “ceil”.
- openeo.processes.climatological_normal(data, period, climatology_period=<object object>)[source]¶
Compute climatology normals
- Parameters:
data – A data cube with exactly one temporal dimension. The data cube must span at least the temporal interval specified in the parameter climatology-period. Seasonal periods may span two consecutive years, e.g. temporal winter that includes months December, January and February. If the required months before the actual climate period are available, the season is taken into account. If not available, the first season is not taken into account and the seasonal mean is based on one year less than the other seasonal normals. The incomplete season at the end of the last year is never taken into account.
period – The time intervals to aggregate the average value for. The following pre-defined frequencies are supported: * day: Day of the year * month: Month of the year * climatology-period: The period specified in the climatology-period. * season: Three month periods of the calendar seasons (December - February, March - May, June - August, September - November). * tropical-season: Six month periods of the tropical seasons (November - April, May - October).
climatology_period – The climatology period as a closed temporal interval. The first element of the array is the first year to be fully included in the temporal interval. The second element is the last year to be fully included in the temporal interval. The default period is from 1981 until 2010 (both inclusive).
- Return type:
- Returns:
A data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged, except for the resolution and dimension labels of the temporal dimension. The temporal dimension has the following dimension labels: * day: 001 - 365 * month: 01 - 12 * climatology-period: climatology-period * season: djf (December - February), mam (March - May), jja (June - August), son (September - November) * tropical-season: ndjfma (November - April), mjjaso (May - October)
See also
openeo.org documentation on process “climatological_normal”.
- openeo.processes.clip(x, min, max)[source]¶
Clip a value between a minimum and a maximum
- Parameters:
x – A number.
min – Minimum value. If the value is lower than this value, the process will return the value of this parameter.
max – Maximum value. If the value is greater than this value, the process will return the value of this parameter.
- Return type:
- Returns:
The value clipped to the specified range.
See also
openeo.org documentation on process “clip”.
- openeo.processes.cloud_detection(data, method, options=<object object>)[source]¶
Create cloud masks
- Parameters:
data – The source data cube containing multi-spectral optical top of the atmosphere (TOA) reflectances on which to perform cloud detection.
method – The cloud detection method to use. To get reproducible results, you have to set a specific method. Set to null to allow the back-end to choose, which will improve portability, but reduce reproducibility as you may get different results if you run the processes multiple times.
options – Proprietary options for the cloud detection method. Specifying proprietary options will reduce portability.
- Return type:
- Returns:
A data cube with bands for the atmospheric disturbances. Each of the masks contains values between 0 and 1. The data cube has the same spatial and temporal dimensions as the source data cube and a dimension that contains a dimension label for each of the supported/considered atmospheric disturbance.
See also
openeo.org documentation on process “cloud_detection”.
- openeo.processes.constant(x)[source]¶
Define a constant value
- Parameters:
x – The value of the constant.
- Return type:
- Returns:
The value of the constant.
See also
openeo.org documentation on process “constant”.
- openeo.processes.cos(x)[source]¶
Cosine
- Parameters:
x – An angle in radians.
- Return type:
- Returns:
The computed cosine of x.
See also
openeo.org documentation on process “cos”.
- openeo.processes.cosh(x)[source]¶
Hyperbolic cosine
- Parameters:
x – An angle in radians.
- Return type:
- Returns:
The computed hyperbolic cosine of x.
See also
openeo.org documentation on process “cosh”.
- openeo.processes.count(data, condition=<object object>, context=<object object>)[source]¶
Count the number of elements
- Parameters:
data – An array with elements of any data type.
condition – A condition consists of one or more processes, which in the end return a boolean value. It is evaluated against each element in the array. An element is counted only if the condition returns true. Defaults to count valid elements in a list (see
is_valid()
). Setting this parameter to boolean true counts all elements in the list.context – Additional data to be passed to the condition.
- Return type:
- Returns:
The counted number of elements.
See also
openeo.org documentation on process “count”.
- openeo.processes.create_raster_cube()[source]¶
Create an empty raster data cube
- Return type:
- Returns:
An empty raster data cube with zero dimensions.
See also
openeo.org documentation on process “create_raster_cube”.
- openeo.processes.cummax(data, ignore_nodata=<object object>)[source]¶
Cumulative maxima
- Parameters:
data – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not and ignores them by default. Setting this flag to false considers no-data values so that null is set for all the following elements.
- Return type:
- Returns:
An array with the computed cumulative maxima.
See also
openeo.org documentation on process “cummax”.
- openeo.processes.cummin(data, ignore_nodata=<object object>)[source]¶
Cumulative minima
- Parameters:
data – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not and ignores them by default. Setting this flag to false considers no-data values so that null is set for all the following elements.
- Return type:
- Returns:
An array with the computed cumulative minima.
See also
openeo.org documentation on process “cummin”.
- openeo.processes.cumproduct(data, ignore_nodata=<object object>)[source]¶
Cumulative products
- Parameters:
data – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not and ignores them by default. Setting this flag to false considers no-data values so that null is set for all the following elements.
- Return type:
- Returns:
An array with the computed cumulative products.
See also
openeo.org documentation on process “cumproduct”.
- openeo.processes.cumsum(data, ignore_nodata=<object object>)[source]¶
Cumulative sums
- Parameters:
data – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not and ignores them by default. Setting this flag to false considers no-data values so that null is set for all the following elements.
- Return type:
- Returns:
An array with the computed cumulative sums.
See also
openeo.org documentation on process “cumsum”.
- openeo.processes.date_shift(date, value, unit)[source]¶
Manipulates dates and times by addition or subtraction
- Parameters:
date – The date (and optionally time) to manipulate. If the given date doesn’t include the time, the process assumes that the time component is 00:00:00Z (i.e. midnight, in UTC). The millisecond part of the time is optional and defaults to 0 if not given.
value – The period of time in the unit given that is added (positive numbers) or subtracted (negative numbers). The value 0 doesn’t have any effect.
unit – The unit for the value given. The following pre-defined units are available: - millisecond: Milliseconds - second: Seconds - leap seconds are ignored in computations. - minute: Minutes - hour: Hours - day: Days - changes only the the day part of a date - week: Weeks (equivalent to 7 days) - month: Months - year: Years Manipulations with the unit year, month, week or day do never change the time. If any of the manipulations result in an invalid date or time, the corresponding part is rounded down to the next valid date or time respectively. For example, adding a month to 2020-01-31 would result in 2020-02-29.
- Return type:
- Returns:
The manipulated date. If a time component was given in the parameter date, the time component is returned with the date.
See also
openeo.org documentation on process “date_shift”.
- openeo.processes.dimension_labels(data, dimension)[source]¶
Get the dimension labels
- Parameters:
data – The data cube.
dimension – The name of the dimension to get the labels for.
- Return type:
- Returns:
The labels as an array.
See also
openeo.org documentation on process “dimension_labels”.
- openeo.processes.divide(x, y)[source]¶
Division of two numbers
- Parameters:
x – The dividend.
y – The divisor.
- Return type:
- Returns:
The computed result.
See also
openeo.org documentation on process “divide”.
- openeo.processes.drop_dimension(data, name)[source]¶
Remove a dimension
- Parameters:
data – The data cube to drop a dimension from.
name – Name of the dimension to drop.
- Return type:
- Returns:
A data cube without the specified dimension. The number of dimensions decreases by one, but the dimension properties (name, type, labels, reference system and resolution) for all other dimensions remain unchanged.
See also
openeo.org documentation on process “drop_dimension”.
- openeo.processes.e()[source]¶
Euler’s number (e)
- Return type:
- Returns:
The numerical value of Euler’s number.
See also
openeo.org documentation on process “e”.
- openeo.processes.eq(x, y, delta=<object object>, case_sensitive=<object object>)[source]¶
Equal to comparison
- Parameters:
x – First operand.
y – Second operand.
delta – Only applicable for comparing two numbers. If this optional parameter is set to a positive non-zero number the equality of two numbers is checked against a delta value. This is especially useful to circumvent problems with floating-point inaccuracy in machine-based computation. This option is basically an alias for the following computation: lte(abs(minus([x, y]), delta)
case_sensitive – Only applicable for comparing two strings. Case sensitive comparison can be disabled by setting this parameter to false.
- Return type:
- Returns:
true if x is equal to y, null if any operand is null, otherwise false.
See also
openeo.org documentation on process “eq”.
- openeo.processes.exp(p)[source]¶
Exponentiation to the base e
- Parameters:
p – The numerical exponent.
- Return type:
- Returns:
The computed value for e raised to the power of p.
See also
openeo.org documentation on process “exp”.
- openeo.processes.extrema(data, ignore_nodata=<object object>)[source]¶
Minimum and maximum values
- Parameters:
data – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that an array with two null values is returned if any value is such a value.
- Return type:
- Returns:
An array containing the minimum and maximum values for the specified numbers. The first element is the minimum, the second element is the maximum. If the input array is empty both elements are set to null.
See also
openeo.org documentation on process “extrema”.
- openeo.processes.filter_bands(data, bands=<object object>, wavelengths=<object object>)[source]¶
Filter the bands by names
- Parameters:
data – A data cube with bands.
bands – A list of band names. Either the unique band name (metadata field name in bands) or one of the common band names (metadata field common_name in bands). If the unique band name and the common name conflict, the unique band name has a higher priority. The order of the specified array defines the order of the bands in the data cube. If multiple bands match a common name, all matched bands are included in the original order.
wavelengths – A list of sub-lists with each sub-list consisting of two elements. The first element is the minimum wavelength and the second element is the maximum wavelength. Wavelengths are specified in micrometers (μm). The order of the specified array defines the order of the bands in the data cube. If multiple bands match the wavelengths, all matched bands are included in the original order.
- Return type:
- Returns:
A data cube limited to a subset of its original bands. The dimensions and dimension properties (name, type, labels, reference system and resolution) remain unchanged, except that the dimension of type bands has less (or the same) dimension labels.
See also
openeo.org documentation on process “filter_bands”.
- openeo.processes.filter_bbox(data, extent)[source]¶
Spatial filter using a bounding box
- Parameters:
data – A data cube.
extent – A bounding box, which may include a vertical axis (see base and height).
- Return type:
- Returns:
A data cube restricted to the bounding box. The dimensions and dimension properties (name, type, labels, reference system and resolution) remain unchanged, except that the spatial dimensions have less (or the same) dimension labels.
See also
openeo.org documentation on process “filter_bbox”.
- openeo.processes.filter_labels(data, condition, dimension, context=<object object>)[source]¶
Filter dimension labels based on a condition
- Parameters:
data – A data cube.
condition – A condition that is evaluated against each dimension label in the specified dimension. A dimension label and the corresponding data is preserved for the given dimension, if the condition returns true.
dimension – The name of the dimension to filter on. Fails with a DimensionNotAvailable exception if the specified dimension does not exist.
context – Additional data to be passed to the condition.
- Return type:
- Returns:
A data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged, except that the given dimension has less (or the same) dimension labels.
See also
openeo.org documentation on process “filter_labels”.
- openeo.processes.filter_spatial(data, geometries)[source]¶
Spatial filter using geometries
- Parameters:
data – A data cube.
geometries – One or more geometries used for filtering, specified as GeoJSON.
- Return type:
- Returns:
A data cube restricted to the specified geometries. The dimensions and dimension properties (name, type, labels, reference system and resolution) remain unchanged, except that the spatial dimensions have less (or the same) dimension labels.
See also
openeo.org documentation on process “filter_spatial”.
- openeo.processes.filter_temporal(data, extent, dimension=<object object>)[source]¶
Temporal filter based on temporal intervals
- Parameters:
data – A data cube.
extent – Left-closed temporal interval, i.e. an array with exactly two elements: 1. The first element is the start of the temporal interval. The specified instance in time is included in the interval. 2. The second element is the end of the temporal interval. The specified instance in time is excluded from the interval. The specified temporal strings follow [RFC 3339](https://www.rfc- editor.org/rfc/rfc3339.html). Also supports open intervals by setting one of the boundaries to null, but never both.
dimension – The name of the temporal dimension to filter on. If no specific dimension is specified or it is set to null, the filter applies to all temporal dimensions. Fails with a DimensionNotAvailable exception if the specified dimension does not exist.
- Return type:
- Returns:
A data cube restricted to the specified temporal extent. The dimensions and dimension properties (name, type, labels, reference system and resolution) remain unchanged, except that the temporal dimensions (determined by dimensions parameter) may have less dimension labels.
See also
openeo.org documentation on process “filter_temporal”.
- openeo.processes.first(data, ignore_nodata=<object object>)[source]¶
First element
- Parameters:
data – An array with elements of any data type.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if the first value is such a value.
- Return type:
- Returns:
The first element of the input array.
See also
openeo.org documentation on process “first”.
- openeo.processes.fit_class_random_forest(predictors, target, max_variables, num_trees=<object object>, seed=<object object>)[source]¶
Train a random forest classification model
- Parameters:
predictors – The predictors for the classification model as a vector data cube. Aggregated to the features (vectors) of the target input variable.
target – The training sites for the classification model as a vector data cube. This is associated with the target variable for the Random Forest model. The geometry has to associated with a value to predict (e.g. fractional forest canopy cover).
max_variables – Specifies how many split variables will be used at a node. The following options are available: - integer: The given number of variables are considered for each split. - all: All variables are considered for each split. - log2: The logarithm with base 2 of the number of variables are considered for each split. - onethird: A third of the number of variables are considered for each split. - sqrt: The square root of the number of variables are considered for each split. This is often the default for classification.
num_trees – The number of trees build within the Random Forest classification.
seed – A randomization seed to use for the random sampling in training. If not given or null, no seed is used and results may differ on subsequent use.
- Return type:
- Returns:
A model object that can be saved with
save_ml_model()
and restored withload_ml_model()
.
See also
openeo.org documentation on process “fit_class_random_forest”.
- openeo.processes.fit_curve(data, parameters, function, dimension)[source]¶
Curve fitting
- Parameters:
data – A data cube.
parameters – Defined the number of parameters for the model function and provides an initial guess for them. At least one parameter is required.
function – The model function. It must take the parameters to fit as array through the first argument and the independent variable x as the second argument. It is recommended to store the model function as a user-defined process on the back-end to be able to re-use the model function with the computed optimal values for the parameters afterwards.
dimension – The name of the dimension for curve fitting. Must be a dimension with labels that have a order (i.e. numerical labels or a temporal dimension). Fails with a DimensionNotAvailable exception if the specified dimension does not exist.
- Return type:
- Returns:
A data cube with the optimal values for the parameters.
See also
openeo.org documentation on process “fit_curve”.
- openeo.processes.fit_regr_random_forest(predictors, target, max_variables, num_trees=<object object>, seed=<object object>)[source]¶
Train a random forest regression model
- Parameters:
predictors – The predictors for the regression model as a vector data cube. Aggregated to the features (vectors) of the target input variable.
target – The training sites for the regression model as a vector data cube. This is associated with the target variable for the Random Forest model. The geometry has to associated with a value to predict (e.g. fractional forest canopy cover).
max_variables – Specifies how many split variables will be used at a node. The following options are available: - integer: The given number of variables are considered for each split. - all: All variables are considered for each split. - log2: The logarithm with base 2 of the number of variables are considered for each split. - onethird: A third of the number of variables are considered for each split. This is often the default for regression. - sqrt: The square root of the number of variables are considered for each split.
num_trees – The number of trees build within the Random Forest regression.
seed – A randomization seed to use for the random sampling in training. If not given or null, no seed is used and results may differ on subsequent use.
- Return type:
- Returns:
A model object that can be saved with
save_ml_model()
and restored withload_ml_model()
.
See also
openeo.org documentation on process “fit_regr_random_forest”.
- openeo.processes.flatten_dimensions(data, dimensions, target_dimension, label_separator=<object object>)[source]¶
Combine multiple dimensions into a single dimension
- Parameters:
data – A data cube.
dimensions – The names of the dimension to combine. The order of the array defines the order in which the dimension labels and values are combined (see the example in the process description). Fails with a DimensionNotAvailable exception if at least one of the specified dimensions does not exist.
target_dimension – The name of the new target dimension. A new dimensions will be created with the given names and type other (see
add_dimension()
). Fails with a TargetDimensionExists exception if a dimension with the specified name exists.label_separator – The string that will be used as a separator for the concatenated dimension labels. To unambiguously revert the dimension labels with the process
unflatten_dimension()
, the given string must not be contained in any of the dimension labels.
- Return type:
- Returns:
A data cube with the new shape. The dimension properties (name, type, labels, reference system and resolution) for all other dimensions remain unchanged.
See also
openeo.org documentation on process “flatten_dimensions”.
- openeo.processes.floor(x)[source]¶
Round fractions down
- Parameters:
x – A number to round down.
- Return type:
- Returns:
The number rounded down.
See also
openeo.org documentation on process “floor”.
- openeo.processes.gt(x, y)[source]¶
Greater than comparison
- Parameters:
x – First operand.
y – Second operand.
- Return type:
- Returns:
true if x is strictly greater than y or null if any operand is null, otherwise false.
See also
openeo.org documentation on process “gt”.
- openeo.processes.gte(x, y)[source]¶
Greater than or equal to comparison
- Parameters:
x – First operand.
y – Second operand.
- Return type:
- Returns:
true if x is greater than or equal to y, null if any operand is null, otherwise false.
See also
openeo.org documentation on process “gte”.
- openeo.processes.if_(value, accept, reject=<object object>)[source]¶
If-Then-Else conditional
- Parameters:
value – A boolean value.
accept – A value that is returned if the boolean value is true.
reject – A value that is returned if the boolean value is not true. Defaults to null.
- Return type:
- Returns:
Either the accept or reject argument depending on the given boolean value.
See also
openeo.org documentation on process “if_”.
- openeo.processes.inspect(data, code=<object object>, level=<object object>, message=<object object>)[source]¶
Add information to the logs
- Parameters:
data – Data to log.
code – A label to help identify one or more log entries originating from this process in the list of all log entries. It can help to group or filter log entries and is usually not unique.
level – The severity level of this message, defaults to info.
message – A message to send in addition to the data.
- Return type:
- Returns:
The data as passed to the data parameter without any modification.
See also
openeo.org documentation on process “inspect”.
- openeo.processes.int(x)[source]¶
Integer part of a number
- Parameters:
x – A number.
- Return type:
- Returns:
Integer part of the number.
See also
openeo.org documentation on process “int”.
- openeo.processes.is_infinite(x)[source]¶
Value is an infinite number
- Parameters:
x – The data to check.
- Return type:
- Returns:
true if the data is an infinite number, otherwise false.
See also
openeo.org documentation on process “is_infinite”.
- openeo.processes.is_nan(x)[source]¶
Value is not a number
- Parameters:
x – The data to check.
- Return type:
- Returns:
true if the data is not a number, otherwise false.
See also
openeo.org documentation on process “is_nan”.
- openeo.processes.is_nodata(x)[source]¶
Value is a no-data value
- Parameters:
x – The data to check.
- Return type:
- Returns:
true if the data is a no-data value, otherwise false.
See also
openeo.org documentation on process “is_nodata”.
- openeo.processes.is_valid(x)[source]¶
Value is valid data
- Parameters:
x – The data to check.
- Return type:
- Returns:
true if the data is valid, otherwise false.
See also
openeo.org documentation on process “is_valid”.
- openeo.processes.last(data, ignore_nodata=<object object>)[source]¶
Last element
- Parameters:
data – An array with elements of any data type.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if the last value is such a value.
- Return type:
- Returns:
The last element of the input array.
See also
openeo.org documentation on process “last”.
- openeo.processes.linear_scale_range(x, inputMin, inputMax, outputMin=<object object>, outputMax=<object object>)[source]¶
Linear transformation between two ranges
- Parameters:
x – A number to transform. The number gets clipped to the bounds specified in inputMin and inputMax.
inputMin – Minimum value the input can obtain.
inputMax – Maximum value the input can obtain.
outputMin – Minimum value of the desired output range.
outputMax – Maximum value of the desired output range.
- Return type:
- Returns:
The transformed number.
See also
openeo.org documentation on process “linear_scale_range”.
- openeo.processes.ln(x)[source]¶
Natural logarithm
- Parameters:
x – A number to compute the natural logarithm for.
- Return type:
- Returns:
The computed natural logarithm.
See also
openeo.org documentation on process “ln”.
- openeo.processes.load_collection(id, spatial_extent, temporal_extent, bands=<object object>, properties=<object object>)[source]¶
Load a collection
- Parameters:
id – The collection id.
spatial_extent – Limits the data to load from the collection to the specified bounding box or polygons. The process puts a pixel into the data cube if the point at the pixel center intersects with the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC). The GeoJSON can be one of the following feature types: * A Polygon or MultiPolygon geometry, * a Feature with a Polygon or MultiPolygon geometry, * a FeatureCollection containing at least one Feature with Polygon or MultiPolygon geometries, or * a GeometryCollection containing Polygon or MultiPolygon geometries. To maximize interoperability, GeometryCollection should be avoided in favour of one of the alternatives above. Set this parameter to null to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using
filter_bbox()
orfilter_spatial()
directly after loading unbounded data.temporal_extent – Limits the data to load from the collection to the specified left-closed temporal interval. Applies to all temporal dimensions. The interval has to be specified as an array with exactly two elements: 1. The first element is the start of the temporal interval. The specified instance in time is included in the interval. 2. The second element is the end of the temporal interval. The specified instance in time is excluded from the interval. The specified temporal strings follow [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html). Also supports open intervals by setting one of the boundaries to null, but never both. Set this parameter to null to set no limit for the temporal extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using
filter_temporal()
directly after loading unbounded data.bands – Only adds the specified bands into the data cube so that bands that don’t match the list of band names are not available. Applies to all dimensions of type bands. Either the unique band name (metadata field name in bands) or one of the common band names (metadata field common_name in bands) can be specified. If the unique band name and the common name conflict, the unique band name has a higher priority. The order of the specified array defines the order of the bands in the data cube. If multiple bands match a common name, all matched bands are included in the original order. It is recommended to use this parameter instead of using
filter_bands()
directly after loading unbounded data.properties – Limits the data by metadata properties to include only data in the data cube which all given conditions return true for (AND operation). Specify key-value-pairs with the key being the name of the metadata property, which can be retrieved with the openEO Data Discovery for Collections. The value must be a condition (user-defined process) to be evaluated against the collection metadata, see the example.
- Return type:
- Returns:
A data cube for further processing. The dimensions and dimension properties (name, type, labels, reference system and resolution) correspond to the collection’s metadata, but the dimension labels are restricted as specified in the parameters.
See also
openeo.org documentation on process “load_collection”.
- openeo.processes.load_ml_model(id)[source]¶
Load a ML model
- Parameters:
id – The STAC Item to load the machine learning model from. The STAC Item must implement the ml- model extension.
- Return type:
- Returns:
A machine learning model to be used with machine learning processes such as
predict_random_forest()
.
See also
openeo.org documentation on process “load_ml_model”.
- openeo.processes.load_result(id, spatial_extent=<object object>, temporal_extent=<object object>, bands=<object object>)[source]¶
Load batch job results
- Parameters:
id – The id of a batch job with results.
spatial_extent – Limits the data to load from the batch job result to the specified bounding box or polygons. The process puts a pixel into the data cube if the point at the pixel center intersects with the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC). The GeoJSON can be one of the following feature types: * A Polygon or MultiPolygon geometry, * a Feature with a Polygon or MultiPolygon geometry, * a FeatureCollection containing at least one Feature with Polygon or MultiPolygon geometries, or * a GeometryCollection containing Polygon or MultiPolygon geometries. To maximize interoperability, GeometryCollection should be avoided in favour of one of the alternatives above. Set this parameter to null to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using
filter_bbox()
orfilter_spatial()
directly after loading unbounded data.temporal_extent – Limits the data to load from the batch job result to the specified left-closed temporal interval. Applies to all temporal dimensions. The interval has to be specified as an array with exactly two elements: 1. The first element is the start of the temporal interval. The specified instance in time is included in the interval. 2. The second element is the end of the temporal interval. The specified instance in time is excluded from the interval. The specified temporal strings follow [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html). Also supports open intervals by setting one of the boundaries to null, but never both. Set this parameter to null to set no limit for the temporal extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using
filter_temporal()
directly after loading unbounded data.bands – Only adds the specified bands into the data cube so that bands that don’t match the list of band names are not available. Applies to all dimensions of type bands. Either the unique band name (metadata field name in bands) or one of the common band names (metadata field common_name in bands) can be specified. If the unique band name and the common name conflict, the unique band name has a higher priority. The order of the specified array defines the order of the bands in the data cube. If multiple bands match a common name, all matched bands are included in the original order. It is recommended to use this parameter instead of using
filter_bands()
directly after loading unbounded data.
- Return type:
- Returns:
A data cube for further processing.
See also
openeo.org documentation on process “load_result”.
- openeo.processes.load_uploaded_files(paths, format, options=<object object>)[source]¶
Load files from the user workspace
- Parameters:
paths – The files to read. Folders can’t be specified, specify all files instead. An exception is thrown if a file can’t be read.
format – The file format to read from. It must be one of the values that the server reports as supported input file formats, which usually correspond to the short GDAL/OGR codes. If the format is not suitable for loading the data, a FormatUnsuitable exception will be thrown. This parameter is case insensitive.
options – The file format parameters to be used to read the files. Must correspond to the parameters that the server reports as supported parameters for the chosen format. The parameter names and valid values usually correspond to the GDAL/OGR format options.
- Return type:
- Returns:
A data cube for further processing.
See also
openeo.org documentation on process “load_uploaded_files”.
- openeo.processes.log(x, base)[source]¶
Logarithm to a base
- Parameters:
x – A number to compute the logarithm for.
base – The numerical base.
- Return type:
- Returns:
The computed logarithm.
See also
openeo.org documentation on process “log”.
- openeo.processes.lt(x, y)[source]¶
Less than comparison
- Parameters:
x – First operand.
y – Second operand.
- Return type:
- Returns:
true if x is strictly less than y, null if any operand is null, otherwise false.
See also
openeo.org documentation on process “lt”.
- openeo.processes.lte(x, y)[source]¶
Less than or equal to comparison
- Parameters:
x – First operand.
y – Second operand.
- Return type:
- Returns:
true if x is less than or equal to y, null if any operand is null, otherwise false.
See also
openeo.org documentation on process “lte”.
- openeo.processes.mask(data, mask, replacement=<object object>)[source]¶
Apply a raster mask
- Parameters:
data – A raster data cube.
mask – A mask as a raster data cube. Every pixel in data must have a corresponding element in mask.
replacement – The value used to replace masked values with.
- Return type:
- Returns:
A masked raster data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged.
See also
openeo.org documentation on process “mask”.
- openeo.processes.mask_polygon(data, mask, replacement=<object object>, inside=<object object>)[source]¶
Apply a polygon mask
- Parameters:
data – A raster data cube.
mask – A GeoJSON object containing at least one polygon. The provided feature types can be one of the following: * A Polygon or MultiPolygon geometry, * a Feature with a Polygon or MultiPolygon geometry, * a FeatureCollection containing at least one Feature with Polygon or MultiPolygon geometries, or * a GeometryCollection containing Polygon or MultiPolygon geometries. To maximize interoperability, GeometryCollection should be avoided in favour of one of the alternatives above.
replacement – The value used to replace masked values with.
inside – If set to true all pixels for which the point at the pixel center does intersect with any polygon are replaced.
- Return type:
- Returns:
A masked raster data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged.
See also
openeo.org documentation on process “mask_polygon”.
- openeo.processes.max(data, ignore_nodata=<object object>)[source]¶
Maximum value
- Parameters:
data – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if any value is such a value.
- Return type:
- Returns:
The maximum value.
See also
openeo.org documentation on process “max”.
- openeo.processes.mean(data, ignore_nodata=<object object>)[source]¶
Arithmetic mean (average)
- Parameters:
data – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if any value is such a value.
- Return type:
- Returns:
The computed arithmetic mean.
See also
openeo.org documentation on process “mean”.
- openeo.processes.median(data, ignore_nodata=<object object>)[source]¶
Statistical median
- Parameters:
data – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if any value is such a value.
- Return type:
- Returns:
The computed statistical median.
See also
openeo.org documentation on process “median”.
- openeo.processes.merge_cubes(cube1, cube2, overlap_resolver=<object object>, context=<object object>)[source]¶
Merge two data cubes
- Parameters:
cube1 – The first data cube.
cube2 – The second data cube.
overlap_resolver – A reduction operator that resolves the conflict if the data overlaps. The reducer must return a value of the same data type as the input values are. The reduction operator may be a single process such as
multiply()
or consist of multiple sub-processes. null (the default) can be specified if no overlap resolver is required.context – Additional data to be passed to the overlap resolver.
- Return type:
- Returns:
The merged data cube. See the process description for details regarding the dimensions and dimension properties (name, type, labels, reference system and resolution).
See also
openeo.org documentation on process “merge_cubes”.
- openeo.processes.min(data, ignore_nodata=<object object>)[source]¶
Minimum value
- Parameters:
data – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if any value is such a value.
- Return type:
- Returns:
The minimum value.
See also
openeo.org documentation on process “min”.
- openeo.processes.mod(x, y)[source]¶
Modulo
- Parameters:
x – A number to be used as the dividend.
y – A number to be used as the divisor.
- Return type:
- Returns:
The remainder after division.
See also
openeo.org documentation on process “mod”.
- openeo.processes.multiply(x, y)[source]¶
Multiplication of two numbers
- Parameters:
x – The multiplier.
y – The multiplicand.
- Return type:
- Returns:
The computed product of the two numbers.
See also
openeo.org documentation on process “multiply”.
- openeo.processes.nan()[source]¶
Not a Number (NaN)
- Return type:
- Returns:
Returns NaN.
See also
openeo.org documentation on process “nan”.
- openeo.processes.ndvi(data, nir=<object object>, red=<object object>, target_band=<object object>)[source]¶
Normalized Difference Vegetation Index
- Parameters:
data – A raster data cube with two bands that have the common names red and nir assigned.
nir – The name of the NIR band. Defaults to the band that has the common name nir assigned. Either the unique band name (metadata field name in bands) or one of the common band names (metadata field common_name in bands) can be specified. If the unique band name and the common name conflict, the unique band name has a higher priority.
red – The name of the red band. Defaults to the band that has the common name red assigned. Either the unique band name (metadata field name in bands) or one of the common band names (metadata field common_name in bands) can be specified. If the unique band name and the common name conflict, the unique band name has a higher priority.
target_band – By default, the dimension of type bands is dropped. To keep the dimension specify a new band name in this parameter so that a new dimension label with the specified name will be added for the computed values.
- Return type:
- Returns:
A raster data cube containing the computed NDVI values. The structure of the data cube differs depending on the value passed to target_band: * target_band is null: The data cube does not contain the dimension of type bands, the number of dimensions decreases by one. The dimension properties (name, type, labels, reference system and resolution) for all other dimensions remain unchanged. * target_band is a string: The data cube keeps the same dimensions. The dimension properties remain unchanged, but the number of dimension labels for the dimension of type bands increases by one. The additional label is named as specified in target_band.
See also
openeo.org documentation on process “ndvi”.
- openeo.processes.neq(x, y, delta=<object object>, case_sensitive=<object object>)[source]¶
Not equal to comparison
- Parameters:
x – First operand.
y – Second operand.
delta – Only applicable for comparing two numbers. If this optional parameter is set to a positive non-zero number the non-equality of two numbers is checked against a delta value. This is especially useful to circumvent problems with floating-point inaccuracy in machine-based computation. This option is basically an alias for the following computation: gt(abs(minus([x, y]), delta)
case_sensitive – Only applicable for comparing two strings. Case sensitive comparison can be disabled by setting this parameter to false.
- Return type:
- Returns:
true if x is not equal to y, null if any operand is null, otherwise false.
See also
openeo.org documentation on process “neq”.
- openeo.processes.normalized_difference(x, y)[source]¶
Normalized difference
- Parameters:
x – The value for the first band.
y – The value for the second band.
- Return type:
- Returns:
The computed normalized difference.
See also
openeo.org documentation on process “normalized_difference”.
- openeo.processes.not_(x)[source]¶
Inverting a boolean
- Parameters:
x – Boolean value to invert.
- Return type:
- Returns:
Inverted boolean value.
See also
openeo.org documentation on process “not_”.
- openeo.processes.or_(x, y)[source]¶
Logical OR
- Parameters:
x – A boolean value.
y – A boolean value.
- Return type:
- Returns:
Boolean result of the logical OR.
See also
openeo.org documentation on process “or_”.
- openeo.processes.order(data, asc=<object object>, nodata=<object object>)[source]¶
Create a permutation
- Parameters:
data – An array to compute the order for.
asc – The default sort order is ascending, with smallest values first. To sort in reverse (descending) order, set this parameter to false.
nodata – Controls the handling of no-data values (null). By default, they are removed. If set to true, missing values in the data are put last; if set to false, they are put first.
- Return type:
- Returns:
The computed permutation.
See also
openeo.org documentation on process “order”.
- openeo.processes.pi()[source]¶
Pi (π)
- Return type:
- Returns:
The numerical value of Pi.
See also
openeo.org documentation on process “pi”.
- openeo.processes.power(base, p)[source]¶
Exponentiation
- Parameters:
base – The numerical base.
p – The numerical exponent.
- Return type:
- Returns:
The computed value for base raised to the power of p.
See also
openeo.org documentation on process “power”.
- openeo.processes.predict_curve(data, parameters, function, dimension, labels=<object object>)[source]¶
Predict values
- Parameters:
data – A data cube to predict values for.
parameters – A data cube with optimal values from a result of e.g.
fit_curve()
.function – The model function. It must take the parameters to fit as array through the first argument and the independent variable x as the second argument. It is recommended to store the model function as a user-defined process on the back-end.
dimension – The name of the dimension for predictions. Fails with a DimensionNotAvailable exception if the specified dimension does not exist.
labels – The labels to predict values for. If no labels are given, predicts values only for no-data (null) values in the data cube.
- Return type:
- Returns:
A data cube with the predicted values.
See also
openeo.org documentation on process “predict_curve”.
- openeo.processes.predict_random_forest(data, model)[source]¶
Predict values from a Random Forest model
- Parameters:
data – An array of numbers.
model – A model object that can be trained with the processes
fit_regr_random_forest()
(regression) andfit_class_random_forest()
(classification).
- Return type:
- Returns:
The predicted value. Returns null if any of the given values in the array is a no-data value.
See also
openeo.org documentation on process “predict_random_forest”.
- openeo.processes.product(data, ignore_nodata=<object object>)[source]¶
Compute the product by multiplying numbers
- Parameters:
data – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if any value is such a value.
- Return type:
- Returns:
The computed product of the sequence of numbers.
See also
openeo.org documentation on process “product”.
- openeo.processes.quantiles(data, probabilities=<object object>, q=<object object>, ignore_nodata=<object object>)[source]¶
Quantiles
- Parameters:
data – An array of numbers.
probabilities – A list of probabilities to calculate quantiles for. The probabilities must be between 0 and 1 (inclusive).
q – Number of intervals to calculate quantiles for. Calculates q-quantiles with equal-sized intervals.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that an array with null values is returned if any element is such a value.
- Return type:
- Returns:
An array with the computed quantiles. The list has either * as many elements as the given list of probabilities had or * `q`-1 elements. If the input array is empty the resulting array is filled with as many null values as required according to the list above. See the ‘Empty array’ example for an example.
See also
openeo.org documentation on process “quantiles”.
- openeo.processes.rearrange(data, order)[source]¶
Rearrange an array based on a permutation
- Parameters:
data – The array to rearrange.
order – The permutation used for rearranging.
- Return type:
- Returns:
The rearranged array.
See also
openeo.org documentation on process “rearrange”.
- openeo.processes.reduce_dimension(data, reducer, dimension, context=<object object>)[source]¶
Reduce dimensions
- Parameters:
data – A data cube.
reducer – A reducer to apply on the specified dimension. A reducer is a single process such as
mean()
or a set of processes, which computes a single value for a list of values, see the category ‘reducer’ for such processes.dimension – The name of the dimension over which to reduce. Fails with a DimensionNotAvailable exception if the specified dimension does not exist.
context – Additional data to be passed to the reducer.
- Return type:
- Returns:
A data cube with the newly computed values. It is missing the given dimension, the number of dimensions decreases by one. The dimension properties (name, type, labels, reference system and resolution) for all other dimensions remain unchanged.
See also
openeo.org documentation on process “reduce_dimension”.
- openeo.processes.reduce_spatial(data, reducer, context=<object object>)[source]¶
Reduce spatial dimensions ‘x’ and ‘y’
- Parameters:
data – A data cube.
reducer – A reducer to apply on the horizontal spatial dimensions. A reducer is a single process such as
mean()
or a set of processes, which computes a single value for a list of values, see the category ‘reducer’ for such processes.context – Additional data to be passed to the reducer.
- Return type:
- Returns:
A data cube with the newly computed values. It is missing the horizontal spatial dimensions, the number of dimensions decreases by two. The dimension properties (name, type, labels, reference system and resolution) for all other dimensions remain unchanged.
See also
openeo.org documentation on process “reduce_spatial”.
- openeo.processes.rename_dimension(data, source, target)[source]¶
Rename a dimension
- Parameters:
data – The data cube.
source – The current name of the dimension. Fails with a DimensionNotAvailable exception if the specified dimension does not exist.
target – A new Name for the dimension. Fails with a DimensionExists exception if a dimension with the specified name exists.
- Return type:
- Returns:
A data cube with the same dimensions, but the name of one of the dimensions changes. The old name can not be referred to any longer. The dimension properties (name, type, labels, reference system and resolution) remain unchanged.
See also
openeo.org documentation on process “rename_dimension”.
- openeo.processes.rename_labels(data, dimension, target, source=<object object>)[source]¶
Rename dimension labels
- Parameters:
data – The data cube.
dimension – The name of the dimension to rename the labels for.
target – The new names for the labels. If a target dimension label already exists in the data cube, a LabelExists exception is thrown.
source – The original names of the labels to be renamed to corresponding array elements in the parameter target. It is allowed to only specify a subset of labels to rename, as long as the target and source parameter have the same length. The order of the labels doesn’t need to match the order of the dimension labels in the data cube. By default, the array is empty so that the dimension labels in the data cube are expected to be enumerated. If the dimension labels are not enumerated and the given array is empty, the LabelsNotEnumerated exception is thrown. If one of the source dimension labels doesn’t exist, the LabelNotAvailable exception is thrown.
- Return type:
- Returns:
The data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged, except that for the given dimension the labels change. The old labels can not be referred to any longer. The number of labels remains the same.
See also
openeo.org documentation on process “rename_labels”.
- openeo.processes.resample_cube_spatial(data, target, method=<object object>)[source]¶
Resample the spatial dimensions to match a target data cube
- Parameters:
data – A data cube.
target – A data cube that describes the spatial target resolution.
method – Resampling method to use. The following options are available and are meant to align with [gdalwarp](https://gdal.org/programs/gdalwarp.html#cmdoption-gdalwarp-r): * average: average (mean) resampling, computes the weighted average of all valid pixels * bilinear: bilinear resampling * cubic: cubic resampling * cubicspline: cubic spline resampling * lanczos: Lanczos windowed sinc resampling * max: maximum resampling, selects the maximum value from all valid pixels * med: median resampling, selects the median value of all valid pixels * min: minimum resampling, selects the minimum value from all valid pixels * mode: mode resampling, selects the value which appears most often of all the sampled points * near: nearest neighbour resampling (default) * q1: first quartile resampling, selects the first quartile value of all valid pixels * q3: third quartile resampling, selects the third quartile value of all valid pixels * rms root mean square (quadratic mean) of all valid pixels * sum: compute the weighted sum of all valid pixels Valid pixels are determined based on the function
is_valid()
.
- Return type:
- Returns:
A data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged, except for the resolution and dimension labels of the spatial dimensions.
See also
openeo.org documentation on process “resample_cube_spatial”.
- openeo.processes.resample_cube_temporal(data, target, dimension=<object object>, valid_within=<object object>)[source]¶
Resample temporal dimensions to match a target data cube
- Parameters:
data – A data cube with one or more temporal dimensions.
target – A data cube that describes the temporal target resolution.
dimension – The name of the temporal dimension to resample, which must exist with this name in both data cubes. If the dimension is not set or is set to null, the process resamples all temporal dimensions that exist with the same names in both data cubes. The following exceptions may occur: * A dimension is given, but it does not exist in any of the data cubes: DimensionNotAvailable * A dimension is given, but one of them is not temporal: DimensionMismatch * No specific dimension name is given and there are no temporal dimensions with the same name in the data: DimensionMismatch
valid_within – Setting this parameter to a numerical value enables that the process searches for valid values within the given period of days before and after the target timestamps. Valid values are determined based on the function
is_valid()
. For example, the limit of 7 for the target timestamps 2020-01-15 12:00:00 looks for a nearest neighbor after 2020-01-08 12:00:00 and before 2020-01-22 12:00:00. If no valid value is found within the given period, the value will be set to no-data (null).
- Return type:
- Returns:
A raster data cube with the same dimensions and the same dimension properties (name, type, labels, reference system and resolution) for all non-temporal dimensions. For the temporal dimension, the name and type remain unchanged, but the dimension labels, resolution and reference system may change.
See also
openeo.org documentation on process “resample_cube_temporal”.
- openeo.processes.resample_spatial(data, resolution=<object object>, projection=<object object>, method=<object object>, align=<object object>)[source]¶
Resample and warp the spatial dimensions
- Parameters:
data – A raster data cube.
resolution – Resamples the data cube to the target resolution, which can be specified either as separate values for x and y or as a single value for both axes. Specified in the units of the target projection. Doesn’t change the resolution by default (0).
projection – Warps the data cube to the target projection, specified as as [EPSG code](http://www.epsg-registry.org/), [WKT2 (ISO 19162) string](http://docs.opengeospatial.org/is/18-010r7/18-010r7.html), [PROJ definition (deprecated)](https://proj.org/usage/quickstart.html). By default (null), the projection is not changed.
method – Resampling method to use. The following options are available and are meant to align with [gdalwarp](https://gdal.org/programs/gdalwarp.html#cmdoption-gdalwarp-r): * average: average (mean) resampling, computes the weighted average of all valid pixels * bilinear: bilinear resampling * cubic: cubic resampling * cubicspline: cubic spline resampling * lanczos: Lanczos windowed sinc resampling * max: maximum resampling, selects the maximum value from all valid pixels * med: median resampling, selects the median value of all valid pixels * min: minimum resampling, selects the minimum value from all valid pixels * mode: mode resampling, selects the value which appears most often of all the sampled points * near: nearest neighbour resampling (default) * q1: first quartile resampling, selects the first quartile value of all valid pixels * q3: third quartile resampling, selects the third quartile value of all valid pixels * rms root mean square (quadratic mean) of all valid pixels * sum: compute the weighted sum of all valid pixels Valid pixels are determined based on the function
is_valid()
.align – Specifies to which corner of the spatial extent the new resampled data is aligned to.
- Return type:
- Returns:
A raster data cube with values warped onto the new projection. It has the same dimensions and the same dimension properties (name, type, labels, reference system and resolution) for all non-spatial or vertical spatial dimensions. For the horizontal spatial dimensions the name and type remain unchanged, but reference system, labels and resolution may change depending on the given parameters.
See also
openeo.org documentation on process “resample_spatial”.
- openeo.processes.round(x, p=<object object>)[source]¶
Round to a specified precision
- Parameters:
x – A number to round.
p – A positive number specifies the number of digits after the decimal point to round to. A negative number means rounding to a power of ten, so for example -2 rounds to the nearest hundred. Defaults to 0.
- Return type:
- Returns:
The rounded number.
See also
openeo.org documentation on process “round”.
- openeo.processes.run_udf(data, udf, runtime, version=<object object>, context=<object object>)[source]¶
Run a UDF
- Parameters:
data – The data to be passed to the UDF.
udf – Either source code, an absolute URL or a path to a UDF script.
runtime – A UDF runtime identifier available at the back-end.
version – An UDF runtime version. If set to null, the default runtime version specified for each runtime is used.
context – Additional data such as configuration options to be passed to the UDF.
- Return type:
- Returns:
The data processed by the UDF. The returned value can be of any data type and is exactly what the UDF code returns.
See also
openeo.org documentation on process “run_udf”.
- openeo.processes.run_udf_externally(data, url, context=<object object>)[source]¶
Run an externally hosted UDF container
- Parameters:
data – The data to be passed to the UDF.
url – Absolute URL to a remote UDF service.
context – Additional data such as configuration options to be passed to the UDF.
- Return type:
- Returns:
The data processed by the UDF. The returned value can in principle be of any data type, but it depends on what is returned by the UDF code. Please see the implemented UDF interface for details.
See also
openeo.org documentation on process “run_udf_externally”.
- openeo.processes.sar_backscatter(data, coefficient=<object object>, elevation_model=<object object>, mask=<object object>, contributing_area=<object object>, local_incidence_angle=<object object>, ellipsoid_incidence_angle=<object object>, noise_removal=<object object>, options=<object object>)[source]¶
Computes backscatter from SAR input
- Parameters:
data – The source data cube containing SAR input.
coefficient – Select the radiometric correction coefficient. The following options are available: * beta0: radar brightness * sigma0-ellipsoid: ground area computed with ellipsoid earth model * sigma0-terrain: ground area computed with terrain earth model * gamma0-ellipsoid: ground area computed with ellipsoid earth model in sensor line of sight * gamma0-terrain: ground area computed with terrain earth model in sensor line of sight (default) * null: non-normalized backscatter
elevation_model – The digital elevation model to use. Set to null (the default) to allow the back- end to choose, which will improve portability, but reduce reproducibility.
mask – If set to true, a data mask is added to the bands with the name mask. It indicates which values are valid (1), invalid (0) or contain no-data (null).
contributing_area – If set to true, a DEM-based local contributing area band named contributing_area is added. The values are given in square meters.
local_incidence_angle – If set to true, a DEM-based local incidence angle band named local_incidence_angle is added. The values are given in degrees.
ellipsoid_incidence_angle – If set to true, an ellipsoidal incidence angle band named ellipsoid_incidence_angle is added. The values are given in degrees.
noise_removal – If set to false, no noise removal is applied. Defaults to true, which removes noise.
options – Proprietary options for the backscatter computations. Specifying proprietary options will reduce portability.
- Return type:
- Returns:
Backscatter values corresponding to the chosen parametrization. The values are given in linear scale.
See also
openeo.org documentation on process “sar_backscatter”.
- openeo.processes.save_ml_model(data, options=<object object>)[source]¶
Save a ML model
- Parameters:
data – The data to store as a machine learning model.
options – Additional parameters to create the file(s).
- Return type:
- Returns:
Returns false if the process failed to store the model, true otherwise.
See also
openeo.org documentation on process “save_ml_model”.
- openeo.processes.save_result(data, format, options=<object object>)[source]¶
Save processed data
- Parameters:
data – The data to deliver in the given file format.
format – The file format to use. It must be one of the values that the server reports as supported output file formats, which usually correspond to the short GDAL/OGR codes. If the format is not suitable for storing the underlying data structure, a FormatUnsuitable exception will be thrown. This parameter is case insensitive.
options – The file format parameters to be used to create the file(s). Must correspond to the parameters that the server reports as supported parameters for the chosen format. The parameter names and valid values usually correspond to the GDAL/OGR format options.
- Return type:
- Returns:
Returns false if the process failed to make the data available, true otherwise.
See also
openeo.org documentation on process “save_result”.
- openeo.processes.sd(data, ignore_nodata=<object object>)[source]¶
Standard deviation
- Parameters:
data – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if any value is such a value.
- Return type:
- Returns:
The computed sample standard deviation.
See also
openeo.org documentation on process “sd”.
- openeo.processes.sgn(x)[source]¶
Signum
- Parameters:
x – A number.
- Return type:
- Returns:
The computed signum value of x.
See also
openeo.org documentation on process “sgn”.
- openeo.processes.sin(x)[source]¶
Sine
- Parameters:
x – An angle in radians.
- Return type:
- Returns:
The computed sine of x.
See also
openeo.org documentation on process “sin”.
- openeo.processes.sinh(x)[source]¶
Hyperbolic sine
- Parameters:
x – An angle in radians.
- Return type:
- Returns:
The computed hyperbolic sine of x.
See also
openeo.org documentation on process “sinh”.
- openeo.processes.sort(data, asc=<object object>, nodata=<object object>)[source]¶
Sort data
- Parameters:
data – An array with data to sort.
asc – The default sort order is ascending, with smallest values first. To sort in reverse (descending) order, set this parameter to false.
nodata – Controls the handling of no-data values (null). By default, they are removed. If set to true, missing values in the data are put last; if set to false, they are put first.
- Return type:
- Returns:
The sorted array.
See also
openeo.org documentation on process “sort”.
- openeo.processes.sqrt(x)[source]¶
Square root
- Parameters:
x – A number.
- Return type:
- Returns:
The computed square root.
See also
openeo.org documentation on process “sqrt”.
- openeo.processes.subtract(x, y)[source]¶
Subtraction of two numbers
- Parameters:
x – The minuend.
y – The subtrahend.
- Return type:
- Returns:
The computed result.
See also
openeo.org documentation on process “subtract”.
- openeo.processes.sum(data, ignore_nodata=<object object>)[source]¶
Compute the sum by adding up numbers
- Parameters:
data – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if any value is such a value.
- Return type:
- Returns:
The computed sum of the sequence of numbers.
See also
openeo.org documentation on process “sum”.
- openeo.processes.tan(x)[source]¶
Tangent
- Parameters:
x – An angle in radians.
- Return type:
- Returns:
The computed tangent of x.
See also
openeo.org documentation on process “tan”.
- openeo.processes.tanh(x)[source]¶
Hyperbolic tangent
- Parameters:
x – An angle in radians.
- Return type:
- Returns:
The computed hyperbolic tangent of x.
See also
openeo.org documentation on process “tanh”.
- openeo.processes.text_begins(data, pattern, case_sensitive=<object object>)[source]¶
Text begins with another text
- Parameters:
data – Text in which to find something at the beginning.
pattern – Text to find at the beginning of data. Regular expressions are not supported.
case_sensitive – Case sensitive comparison can be disabled by setting this parameter to false.
- Return type:
- Returns:
true if data begins with pattern, false` otherwise.
See also
openeo.org documentation on process “text_begins”.
- openeo.processes.text_concat(data, separator=<object object>)[source]¶
Concatenate elements to a single text
- Parameters:
data – A set of elements. Numbers, boolean values and null values get converted to their (lower case) string representation. For example: 1 (integer), -1.5 (number), true / false (boolean values)
separator – A separator to put between each of the individual texts. Defaults to an empty string.
- Return type:
- Returns:
A string containing a string representation of all the array elements in the same order, with the separator between each element.
See also
openeo.org documentation on process “text_concat”.
- openeo.processes.text_contains(data, pattern, case_sensitive=<object object>)[source]¶
Text contains another text
- Parameters:
data – Text in which to find something in.
pattern – Text to find in data. Regular expressions are not supported.
case_sensitive – Case sensitive comparison can be disabled by setting this parameter to false.
- Return type:
- Returns:
true if data contains the pattern, false` otherwise.
See also
openeo.org documentation on process “text_contains”.
- openeo.processes.text_ends(data, pattern, case_sensitive=<object object>)[source]¶
Text ends with another text
- Parameters:
data – Text in which to find something at the end.
pattern – Text to find at the end of data. Regular expressions are not supported.
case_sensitive – Case sensitive comparison can be disabled by setting this parameter to false.
- Return type:
- Returns:
true if data ends with pattern, false` otherwise.
See also
openeo.org documentation on process “text_ends”.
- openeo.processes.trim_cube(data)[source]¶
Remove dimension labels with no-data values
- Parameters:
data – A raster data cube to trim.
- Return type:
- Returns:
A trimmed raster data cube with the same dimensions. The dimension properties name, type, reference system and resolution remain unchanged. The number of dimension labels may decrease.
See also
openeo.org documentation on process “trim_cube”.
- openeo.processes.unflatten_dimension(data, dimension, target_dimensions, label_separator=<object object>)[source]¶
Split a single dimensions into multiple dimensions
- Parameters:
data – A data cube that is consistently structured so that operation can execute flawlessly (e.g. the dimension labels need to contain the label_separator exactly 1 time for two target dimensions, 2 times for three target dimensions etc.).
dimension – The name of the dimension to split.
target_dimensions – The names of the new target dimensions. New dimensions will be created with the given names and type other (see
add_dimension()
). Fails with a TargetDimensionExists exception if any of the dimensions exists. The order of the array defines the order in which the dimensions and dimension labels are added to the data cube (see the example in the process description).label_separator – The string that will be used as a separator to split the dimension labels.
- Return type:
- Returns:
A data cube with the new shape. The dimension properties (name, type, labels, reference system and resolution) for all other dimensions remain unchanged.
See also
openeo.org documentation on process “unflatten_dimension”.
- openeo.processes.variance(data, ignore_nodata=<object object>)[source]¶
Variance
- Parameters:
data – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if any value is such a value.
- Return type:
- Returns:
The computed sample variance.
See also
openeo.org documentation on process “variance”.
- openeo.processes.vector_buffer(geometries, distance)[source]¶
Buffer geometries by distance
- Parameters:
geometries – Geometries to apply the buffer on. Vector properties are preserved for vector data cubes and all GeoJSON Features. To maximize interoperability, a nested GeometryCollection should be avoided. Furthermore, a GeometryCollection composed of a single type of geometries should be avoided in favour of the corresponding multi-part type (e.g. MultiPolygon).
distance – The distance of the buffer in the unit of the spatial reference system. A positive distance expands the geometries and results in outward buffering (dilation) while a negative distance shrinks the geometries and results in inward buffering (erosion).
- Return type:
- Returns:
Returns a vector data cube with the computed new geometries.
See also
openeo.org documentation on process “vector_buffer”.
- openeo.processes.vector_to_random_points(data, geometry_count=<object object>, total_count=<object object>, group=<object object>, seed=<object object>)[source]¶
Sample random points from geometries
- Parameters:
data – Input geometries for sample extraction. To maximize interoperability, a nested GeometryCollection should be avoided. Furthermore, a GeometryCollection composed of a single type of geometries should be avoided in favour of the corresponding multi-part type (e.g. MultiPolygon).
geometry_count – The maximum number of points to compute per geometry. Points in the input geometries can be selected only once by the sampling.
total_count – The maximum number of points to compute overall. Throws a CountMismatch exception if the specified value is less than the provided number of geometries.
group – Specifies whether the sampled points should be grouped by input geometry (default) or be generated as independent points. * If the sampled points are grouped, the process generates a MultiPoint per geometry given which keeps the original identifier if present. * Otherwise, each sampled point is generated as a distinct Point geometry without identifier.
seed – A randomization seed to use for random sampling. If not given or null, no seed is used and results may differ on subsequent use.
- Return type:
- Returns:
Returns a vector data cube with the sampled points.
See also
openeo.org documentation on process “vector_to_random_points”.
- openeo.processes.vector_to_regular_points(data, distance, group=<object object>)[source]¶
Sample regular points from geometries
- Parameters:
data – Input geometries for sample extraction. To maximize interoperability, a nested GeometryCollection should be avoided. Furthermore, a GeometryCollection composed of a single type of geometries should be avoided in favour of the corresponding multi-part type (e.g. MultiPolygon).
distance – Defines the minimum distance in the unit of the reference system that is required between two samples generated inside a single geometry. - For polygons, the distance defines the cell sizes of a regular grid that starts at the upper-left bound of each polygon. The centroid of each cell is then a sample point. If the centroid is not enclosed in the polygon, no point is sampled. If no point can be sampled for the geometry at all, the first coordinate of the geometry is returned as point. - For lines (line strings), the sampling starts with a point at the first coordinate of the line and then walks along the line and samples a new point each time the distance to the previous point has been reached again. - For points, the point is returned as given.
group – Specifies whether the sampled points should be grouped by input geometry (default) or be generated as independent points. * If the sampled points are grouped, the process generates a MultiPoint per geometry given which keeps the original identifier if present. * Otherwise, each sampled point is generated as a distinct Point geometry without identifier.
- Return type:
- Returns:
Returns a vector data cube with the sampled points.
See also
openeo.org documentation on process “vector_to_regular_points”.
- openeo.processes.xor(x, y)[source]¶
Logical XOR (exclusive or)
- Parameters:
x – A boolean value.
y – A boolean value.
- Return type:
- Returns:
Boolean result of the logical XOR.
See also
openeo.org documentation on process “xor”.
ProcessBuilder
helper class¶
- class openeo.processes.ProcessBuilder(pgnode)[source]¶
The
ProcessBuilder
class is a helper class that implements (much like the openEO process functions) each openEO process as a method. On top of that it also adds syntactic sugar to support Python operators as well (e.g.+
is translated to theadd
process).Attention
As normal user, you should never create a
ProcessBuilder
instance directly.You should only interact with this class inside a callback function/lambda while building a child callback process graph as discussed at Callback as a callable.
For example, let’s start from this simple usage snippet where we want to reduce the temporal dimension by taking the temporal mean of each timeseries:
def my_reducer(data): return data.mean() cube.reduce_dimension(reducer=my_reducer, dimension="t")
Note that this
my_reducer
function has adata
argument, which conceptually corresponds to an array of pixel values (along the temporal dimension). However, it’s important to understand that themy_reducer
function is actually not evaluated when you execute your process graph on an openEO back-end, e.g. as a batch jobs. Instead,my_reducer
is evaluated while building your process graph client-side (at the time you execute thatcube.reduce_dimension()
statement to be precise). This means that thatdata
argument is actually not a concrete array of EO data, but some kind of virtual placeholder, aProcessBuilder
instance, that keeps track of the operations you intend to do on the EO data.To make that more concrete, it helps to add type hints which will make it easier to discover what you can do with the argument (depending on which editor or IDE you are using):
from openeo.processes import ProcessBuilder def my_reducer(data: ProcessBuilder) -> ProcessBuilder: return data.mean() cube.reduce_dimension(reducer=my_reducer, dimension="t")
Because
ProcessBuilder
methods return newProcessBuilder
instances, and because it support syntactic sugar to use Python operators on it, and because openeo.process functions also accept and returnProcessBuilder
instances, we can mix methods, functions and operators in the callback function like this:from openeo.processes import ProcessBuilder, cos def my_reducer(data: ProcessBuilder) -> ProcessBuilder: return cos(data.mean()) + 1.23 cube.reduce_dimension(reducer=my_reducer, dimension="t")
or compactly, using an anonymous lambda expression:
from openeo.processes import cos cube.reduce_dimension( reducer=lambda data: cos(data.mean())) + 1.23, dimension="t" )
- absolute()[source]¶
Absolute value
- Parameters:
self – A number.
- Return type:
- Returns:
The computed absolute value.
See also
openeo.org documentation on process “absolute”.
- add(y)[source]¶
Addition of two numbers
- Parameters:
self – The first summand.
y – The second summand.
- Return type:
- Returns:
The computed sum of the two numbers.
See also
openeo.org documentation on process “add”.
- add_dimension(name, label, type=<object object>)[source]¶
Add a new dimension
- Parameters:
self – A data cube to add the dimension to.
name – Name for the dimension.
label – A dimension label.
type – The type of dimension, defaults to other.
- Return type:
- Returns:
The data cube with a newly added dimension. The new dimension has exactly one dimension label. All other dimensions remain unchanged.
See also
openeo.org documentation on process “add_dimension”.
- aggregate_spatial(geometries, reducer, target_dimension=<object object>, context=<object object>)[source]¶
Zonal statistics for geometries
- Parameters:
self – A raster data cube. The data cube must have been reduced to only contain two spatial dimensions and a third dimension the values are aggregated for, for example the temporal dimension to get a time series. Otherwise, this process fails with the TooManyDimensions exception. The data cube implicitly gets restricted to the bounds of the geometries as if
filter_spatial()
would have been used with the same values for the corresponding parameters immediately before this process.geometries – Geometries as GeoJSON on which the aggregation will be based. Vector properties are preserved for vector data cubes and all GeoJSON Features. One value will be computed per GeoJSON Feature, Geometry or GeometryCollection. For a FeatureCollection multiple values will be computed, one value per contained Feature. For example, a single value will be computed for a MultiPolygon, but two values will be computed for a FeatureCollection containing two polygons. - For polygons, the process considers all pixels for which the point at the pixel center intersects with the corresponding polygon (as defined in the Simple Features standard by the OGC). - For points, the process considers the closest pixel center. - For lines (line strings), the process considers all the pixels whose centers are closest to at least one point on the line. Thus, pixels may be part of multiple geometries and be part of multiple aggregations. To maximize interoperability, a nested GeometryCollection should be avoided. Furthermore, a GeometryCollection composed of a single type of geometries should be avoided in favour of the corresponding multi-part type (e.g. MultiPolygon).
reducer – A reducer to be applied on all values of each geometry. A reducer is a single process such as
mean()
or a set of processes, which computes a single value for a list of values, see the category ‘reducer’ for such processes.target_dimension – The name of a new dimensions that is used to store the results. A new dimension will be created with the given name and type other (see
add_dimension()
). Defaults to the dimension name result. Fails with a TargetDimensionExists exception if a dimension with the specified name exists.context – Additional data to be passed to the reducer.
- Return type:
- Returns:
A vector data cube with the computed results and restricted to the bounds of the geometries. The computed value is used for the dimension with the name that was specified in the parameter target_dimension. The computation also stores information about the total count of pixels (valid + invalid pixels) and the number of valid pixels (see
is_valid()
) for each geometry. These values are added as a new dimension with a dimension name derived from target_dimension by adding the suffix _meta. The new dimension has the dimension labels total_count and valid_count.
See also
openeo.org documentation on process “aggregate_spatial”.
- aggregate_spatial_window(reducer, size, boundary=<object object>, align=<object object>, context=<object object>)[source]¶
Zonal statistics for rectangular windows
- Parameters:
self – A raster data cube with exactly two horizontal spatial dimensions and an arbitrary number of additional dimensions. The process is applied to all additional dimensions individually.
reducer – A reducer to be applied on the list of values, which contain all pixels covered by the window. A reducer is a single process such as
mean()
or a set of processes, which computes a single value for a list of values, see the category ‘reducer’ for such processes.size – Window size in pixels along the horizontal spatial dimensions. The first value corresponds to the x axis, the second value corresponds to the y axis.
boundary – Behavior to apply if the number of values for the axes x and y is not a multiple of the corresponding value in the size parameter. Options are: - pad (default): pad the data cube with the no-data value null to fit the required window size. - trim: trim the data cube to fit the required window size. Set the parameter align to specifies to which corner the data is aligned to.
align – If the data requires padding or trimming (see parameter boundary), specifies to which corner of the spatial extent the data is aligned to. For example, if the data is aligned to the upper left, the process pads/trims at the lower-right.
context – Additional data to be passed to the reducer.
- Return type:
- Returns:
A data cube with the newly computed values and the same dimensions. The resolution will change depending on the chosen values for the size and boundary parameter. It usually decreases for the dimensions which have the corresponding parameter size set to values greater than 1. The dimension labels will be set to the coordinate at the center of the window. The other dimension properties (name, type and reference system) remain unchanged.
See also
openeo.org documentation on process “aggregate_spatial_window”.
- aggregate_temporal(intervals, reducer, labels=<object object>, dimension=<object object>, context=<object object>)[source]¶
Temporal aggregations
- Parameters:
self – A data cube.
intervals – Left-closed temporal intervals, which are allowed to overlap. Each temporal interval in the array has exactly two elements: 1. The first element is the start of the temporal interval. The specified instance in time is included in the interval. 2. The second element is the end of the temporal interval. The specified instance in time is excluded from the interval. The specified temporal strings follow [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html). Although [RFC 3339 prohibits the hour to be ‘24’](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.7), this process allows the value ‘24’ for the hour of an end time in order to make it possible that left-closed time intervals can fully cover the day.
reducer – A reducer to be applied for the values contained in each interval. A reducer is a single process such as
mean()
or a set of processes, which computes a single value for a list of values, see the category ‘reducer’ for such processes. Intervals may not contain any values, which for most reducers leads to no-data (null) values by default.labels – Distinct labels for the intervals, which can contain dates and/or times. Is only required to be specified if the values for the start of the temporal intervals are not distinct and thus the default labels would not be unique. The number of labels and the number of groups need to be equal.
dimension – The name of the temporal dimension for aggregation. All data along the dimension is passed through the specified reducer. If the dimension is not set or set to null, the data cube is expected to only have one temporal dimension. Fails with a TooManyDimensions exception if it has more dimensions. Fails with a DimensionNotAvailable exception if the specified dimension does not exist.
context – Additional data to be passed to the reducer.
- Return type:
- Returns:
A new data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged, except for the resolution and dimension labels of the given temporal dimension.
See also
openeo.org documentation on process “aggregate_temporal”.
- aggregate_temporal_period(period, reducer, dimension=<object object>, context=<object object>)[source]¶
Temporal aggregations based on calendar hierarchies
- Parameters:
self – The source data cube.
period – The time intervals to aggregate. The following pre-defined values are available: * hour: Hour of the day * day: Day of the year * week: Week of the year * dekad: Ten day periods, counted per year with three periods per month (day 1 - 10, 11 - 20 and 21 - end of month). The third dekad of the month can range from 8 to 11 days. For example, the fourth dekad is Feb, 1 - Feb, 10 each year. * month: Month of the year * season: Three month periods of the calendar seasons (December - February, March - May, June - August, September - November). * tropical-season: Six month periods of the tropical seasons (November - April, May - October). * year: Proleptic years * decade: Ten year periods ([0-to-9 decade](https://en.wikipedia.org/wiki/Decade#0-to-9_decade)), from a year ending in a 0 to the next year ending in a 9. * decade-ad: Ten year periods ([1-to-0 decade](https://en.wikipedia.org/wiki/Decade#1-to-0_decade)) better aligned with the anno Domini (AD) calendar era, from a year ending in a 1 to the next year ending in a 0.
reducer – A reducer to be applied for the values contained in each period. A reducer is a single process such as
mean()
or a set of processes, which computes a single value for a list of values, see the category ‘reducer’ for such processes. Periods may not contain any values, which for most reducers leads to no-data (null) values by default.dimension – The name of the temporal dimension for aggregation. All data along the dimension is passed through the specified reducer. If the dimension is not set or set to null, the source data cube is expected to only have one temporal dimension. Fails with a TooManyDimensions exception if it has more dimensions. Fails with a DimensionNotAvailable exception if the specified dimension does not exist.
context – Additional data to be passed to the reducer.
- Return type:
- Returns:
A new data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged, except for the resolution and dimension labels of the given temporal dimension. The specified temporal dimension has the following dimension labels (YYYY = four-digit year, MM = two-digit month, DD two-digit day of month): * hour: YYYY-MM- DD-00 - YYYY-MM-DD-23 * day: YYYY-001 - YYYY-365 * week: YYYY-01 - YYYY-52 * dekad: YYYY-00 - YYYY-36 * month: YYYY-01 - YYYY-12 * season: YYYY-djf (December - February), YYYY-mam (March - May), YYYY-jja (June - August), YYYY-son (September - November). * tropical- season: YYYY-ndjfma (November - April), YYYY-mjjaso (May - October). * year: YYYY * decade: YYY0 * decade-ad: YYY1 The dimension labels in the new data cube are complete for the whole extent of the source data cube. For example, if period is set to day and the source data cube has two dimension labels at the beginning of the year (2020-01-01) and the end of a year (2020-12-31), the process returns a data cube with 365 dimension labels (2020-001, 2020-002, …, 2020-365). In contrast, if period is set to day and the source data cube has just one dimension label 2020-01-05, the process returns a data cube with just a single dimension label (2020-005).
See also
openeo.org documentation on process “aggregate_temporal_period”.
- all(ignore_nodata=<object object>)[source]¶
Are all of the values true?
- Parameters:
self – A set of boolean values.
ignore_nodata – Indicates whether no-data values are ignored or not and ignores them by default.
- Return type:
- Returns:
Boolean result of the logical operation.
See also
openeo.org documentation on process “all”.
- and_(y)[source]¶
Logical AND
- Parameters:
self – A boolean value.
y – A boolean value.
- Return type:
- Returns:
Boolean result of the logical AND.
See also
openeo.org documentation on process “and_”.
- anomaly(normals, period)[source]¶
Compute anomalies
- Parameters:
self – A data cube with exactly one temporal dimension and the following dimension labels for the given period (YYYY = four-digit year, MM = two-digit month, DD two-digit day of month): * hour: YYYY-MM-DD-00 - YYYY-MM-DD-23 * day: YYYY-001 - YYYY-365 * week: YYYY-01 - YYYY-52 * dekad: YYYY-00 - YYYY-36 * month: YYYY-01 - YYYY-12 * season: YYYY-djf (December - February), YYYY-mam (March - May), YYYY-jja (June - August), YYYY-son (September - November). * tropical-season: YYYY-ndjfma (November - April), YYYY-mjjaso (May - October). * year: YYYY * decade: YYY0 * decade-ad: YYY1 * single-period / climatology-period: Any
aggregate_temporal_period()
can compute such a data cube.normals – A data cube with normals, e.g. daily, monthly or yearly values computed from a process such as
climatological_normal()
. Must contain exactly one temporal dimension with the following dimension labels for the given period: * hour: 00 - 23 * day: 001 - 365 * week: 01 - 52 * dekad: 00 - 36 * month: 01 - 12 * season: djf (December - February), mam (March - May), jja (June - August), son (September - November) * tropical-season: ndjfma (November - April), mjjaso (May - October) * year: Four-digit year numbers * decade: Four-digit year numbers, the last digit being a 0 * decade-ad: Four-digit year numbers, the last digit being a 1 * single-period / climatology-period: A single dimension label with any name is expected.period – Specifies the time intervals available in the normals data cube. The following options are available: * hour: Hour of the day * day: Day of the year * week: Week of the year * dekad: Ten day periods, counted per year with three periods per month (day 1 - 10, 11 - 20 and 21 - end of month). The third dekad of the month can range from 8 to 11 days. For example, the fourth dekad is Feb, 1 - Feb, 10 each year. * month: Month of the year * season: Three month periods of the calendar seasons (December - February, March - May, June - August, September - November). * tropical- season: Six month periods of the tropical seasons (November - April, May - October). * year: Proleptic years * decade: Ten year periods ([0-to-9 decade](https://en.wikipedia.org/wiki/Decade#0-to-9_decade)), from a year ending in a 0 to the next year ending in a 9. * decade-ad: Ten year periods ([1-to-0 decade](https://en.wikipedia.org/wiki/Decade#1-to-0_decade)) better aligned with the anno Domini (AD) calendar era, from a year ending in a 1 to the next year ending in a 0. * single-period / climatology-period: A single period of arbitrary length
- Return type:
- Returns:
A data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged.
See also
openeo.org documentation on process “anomaly”.
- any(ignore_nodata=<object object>)[source]¶
Is at least one value true?
- Parameters:
self – A set of boolean values.
ignore_nodata – Indicates whether no-data values are ignored or not and ignores them by default.
- Return type:
- Returns:
Boolean result of the logical operation.
See also
openeo.org documentation on process “any”.
- apply(process, context=<object object>)[source]¶
Apply a process to each pixel
- Parameters:
self – A data cube.
process – A process that accepts and returns a single value and is applied on each individual value in the data cube. The process may consist of multiple sub-processes and could, for example, consist of processes such as
absolute()
orlinear_scale_range()
.context – Additional data to be passed to the process.
- Return type:
- Returns:
A data cube with the newly computed values and the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged.
See also
openeo.org documentation on process “apply”.
- apply_dimension(process, dimension, target_dimension=<object object>, context=<object object>)[source]¶
Apply a process to pixels along a dimension
- Parameters:
self – A data cube.
process – Process to be applied on all pixel values. The specified process needs to accept an array and must return an array with at least one element. A process may consist of multiple sub- processes.
dimension – The name of the source dimension to apply the process on. Fails with a DimensionNotAvailable exception if the specified dimension does not exist.
target_dimension – The name of the target dimension or null (the default) to use the source dimension specified in the parameter dimension. By specifying a target dimension, the source dimension is removed. The target dimension with the specified name and the type other (see
add_dimension()
) is created, if it doesn’t exist yet.context – Additional data to be passed to the process.
- Return type:
- Returns:
A data cube with the newly computed values. All dimensions stay the same, except for the dimensions specified in corresponding parameters. There are three cases how the dimensions can change: 1. The source dimension is the target dimension: - The (number of) dimensions remain unchanged as the source dimension is the target dimension. - The source dimension properties name and type remain unchanged. - The dimension labels, the reference system and the resolution are preserved only if the number of pixel values in the source dimension is equal to the number of values computed by the process. Otherwise, all other dimension properties change as defined in the list below. 2. The source dimension is not the target dimension and the latter exists: - The number of dimensions decreases by one as the source dimension is dropped. - The target dimension properties name and type remain unchanged. All other dimension properties change as defined in the list below. 3. The source dimension is not the target dimension and the latter does not exist: - The number of dimensions remain unchanged, but the source dimension is replaced with the target dimension. - The target dimension has the specified name and the type other. All other dimension properties are set as defined in the list below. Unless otherwise stated above, for the given (target) dimension the following applies: - the number of dimension labels is equal to the number of values computed by the process, - the dimension labels are incrementing integers starting from zero, - the resolution changes, and - the reference system is undefined.
See also
openeo.org documentation on process “apply_dimension”.
- apply_kernel(kernel, factor=<object object>, border=<object object>, replace_invalid=<object object>)[source]¶
Apply a spatial convolution with a kernel
- Parameters:
self – A data cube.
kernel – Kernel as a two-dimensional array of weights. The inner level of the nested array aligns with the x axis and the outer level aligns with the y axis. Each level of the kernel must have an uneven number of elements, otherwise the process throws a KernelDimensionsUneven exception.
factor – A factor that is multiplied to each value after the kernel has been applied. This is basically a shortcut for explicitly multiplying each value by a factor afterwards, which is often required for some kernel-based algorithms such as the Gaussian blur.
border – Determines how the data is extended when the kernel overlaps with the borders. Defaults to fill the border with zeroes. The following options are available: * numeric value - fill with a user-defined constant number n: nnnnnn|abcdefgh|nnnnnn (default, with n = 0) * replicate - repeat the value from the pixel at the border: aaaaaa|abcdefgh|hhhhhh * reflect - mirror/reflect from the border: fedcba|abcdefgh|hgfedc * reflect_pixel - mirror/reflect from the center of the pixel at the border: gfedcb|abcdefgh|gfedcb * wrap - repeat/wrap the image: cdefgh|abcdefgh|abcdef
replace_invalid – This parameter specifies the value to replace non-numerical or infinite numerical values with. By default, those values are replaced with zeroes.
- Return type:
- Returns:
A data cube with the newly computed values and the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged.
See also
openeo.org documentation on process “apply_kernel”.
- apply_neighborhood(process, size, overlap=<object object>, context=<object object>)[source]¶
Apply a process to pixels in a n-dimensional neighborhood
- Parameters:
self – A data cube.
process – Process to be applied on all neighborhoods.
size – Neighborhood sizes along each dimension. This object maps dimension names to either a physical measure (e.g. 100 m, 10 days) or pixels (e.g. 32 pixels). For dimensions not specified, the default is to provide all values. Be aware that including all values from overly large dimensions may not be processed at once.
overlap – Overlap of neighborhoods along each dimension to avoid border effects. By default no overlap is provided. For instance a temporal dimension can add 1 month before and after a neighborhood. In the spatial dimensions, this is often a number of pixels. The overlap specified is added before and after, so an overlap of 8 pixels will add 8 pixels on both sides of the window, so 16 in total. Be aware that large overlaps increase the need for computational resources and modifying overlapping data in subsequent operations have no effect.
context – Additional data to be passed to the process.
- Return type:
- Returns:
A data cube with the newly computed values and the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged.
See also
openeo.org documentation on process “apply_neighborhood”.
- arccos()[source]¶
Inverse cosine
- Parameters:
self – A number.
- Return type:
- Returns:
The computed angle in radians.
See also
openeo.org documentation on process “arccos”.
- arcosh()[source]¶
Inverse hyperbolic cosine
- Parameters:
self – A number.
- Return type:
- Returns:
The computed angle in radians.
See also
openeo.org documentation on process “arcosh”.
- arcsin()[source]¶
Inverse sine
- Parameters:
self – A number.
- Return type:
- Returns:
The computed angle in radians.
See also
openeo.org documentation on process “arcsin”.
- arctan()[source]¶
Inverse tangent
- Parameters:
self – A number.
- Return type:
- Returns:
The computed angle in radians.
See also
openeo.org documentation on process “arctan”.
- arctan2(x)[source]¶
Inverse tangent of two numbers
- Parameters:
self – A number to be used as the dividend.
x – A number to be used as the divisor.
- Return type:
- Returns:
The computed angle in radians.
See also
openeo.org documentation on process “arctan2”.
- ard_normalized_radar_backscatter(elevation_model=<object object>, contributing_area=<object object>, ellipsoid_incidence_angle=<object object>, noise_removal=<object object>, options=<object object>)[source]¶
CARD4L compliant SAR NRB generation
- Parameters:
self – The source data cube containing SAR input.
elevation_model – The digital elevation model to use. Set to null (the default) to allow the back-end to choose, which will improve portability, but reduce reproducibility.
contributing_area – If set to true, a DEM-based local contributing area band named contributing_area is added. The values are given in square meters.
ellipsoid_incidence_angle – If set to true, an ellipsoidal incidence angle band named ellipsoid_incidence_angle is added. The values are given in degrees.
noise_removal – If set to false, no noise removal is applied. Defaults to true, which removes noise.
options – Proprietary options for the backscatter computations. Specifying proprietary options will reduce portability.
- Return type:
- Returns:
Backscatter values expressed as gamma0 in linear scale. In addition to the bands contributing_area and ellipsoid_incidence_angle that can optionally be added with corresponding parameters, the following bands are always added to the data cube: - mask: A data mask that indicates which values are valid (1), invalid (0) or contain no-data (null). - local_incidence_angle: A band with DEM-based local incidence angles in degrees. The data returned is CARD4L compliant with corresponding metadata.
See also
openeo.org documentation on process “ard_normalized_radar_backscatter”.
- ard_surface_reflectance(atmospheric_correction_method, cloud_detection_method, elevation_model=<object object>, atmospheric_correction_options=<object object>, cloud_detection_options=<object object>)[source]¶
CARD4L compliant Surface Reflectance generation
- Parameters:
self – The source data cube containing multi-spectral optical top of the atmosphere (TOA) reflectances. There must be a single dimension of type bands available.
atmospheric_correction_method – The atmospheric correction method to use.
cloud_detection_method – The cloud detection method to use. Each method supports detecting different atmospheric disturbances such as clouds, cloud shadows, aerosols, haze, ozone and/or water vapour in optical imagery.
elevation_model – The digital elevation model to use. Set to null (the default) to allow the back-end to choose, which will improve portability, but reduce reproducibility.
atmospheric_correction_options – Proprietary options for the atmospheric correction method. Specifying proprietary options will reduce portability.
cloud_detection_options – Proprietary options for the cloud detection method. Specifying proprietary options will reduce portability.
- Return type:
- Returns:
Data cube containing bottom of atmosphere reflectances for each spectral band in the source data cube, with atmospheric disturbances like clouds and cloud shadows removed. No-data values (null) are directly set in the bands. Depending on the methods used, several additional bands will be added to the data cube: Data cube containing bottom of atmosphere reflectances for each spectral band in the source data cube, with atmospheric disturbances like clouds and cloud shadows removed. Depending on the methods used, several additional bands will be added to the data cube: - date (optional): Specifies per-pixel acquisition timestamps. - incomplete-testing (required): Identifies pixels with a value of 1 for which the per-pixel tests (at least saturation, cloud and cloud shadows, see CARD4L specification for details) have not all been successfully completed. Otherwise, the value is 0. - saturation (required) / saturation_{band} (optional): Indicates where pixels in the input spectral bands are saturated (1) or not (0). If the saturation is given per band, the band names are saturation_{band} with {band} being the band name from the source data cube. - cloud, shadow (both required),`aerosol`, haze, ozone, water_vapor (all optional): Indicates the probability of pixels being an atmospheric disturbance such as clouds. All bands have values between 0 (clear) and 1, which describes the probability that it is an atmospheric disturbance. - snow-ice (optional): Points to a file that indicates whether a pixel is assessed as being snow/ice (1) or not (0). All values describe the probability and must be between 0 and 1. - land-water (optional): Indicates whether a pixel is assessed as being land (1) or water (0). All values describe the probability and must be between 0 and 1. - incidence-angle (optional): Specifies per-pixel incidence angles in degrees. - azimuth (optional): Specifies per-pixel azimuth angles in degrees. - sun-azimuth: (optional): Specifies per- pixel sun azimuth angles in degrees. - sun-elevation (optional): Specifies per-pixel sun elevation angles in degrees. - terrain-shadow (optional): Indicates with a value of 1 whether a pixel is not directly illuminated due to terrain shadowing. Otherwise, the value is 0. - terrain-occlusion (optional): Indicates with a value of 1 whether a pixel is not visible to the sensor due to terrain occlusion during off-nadir viewing. Otherwise, the value is 0. - terrain-illumination (optional): Contains coefficients used for terrain illumination correction are provided for each pixel. The data returned is CARD4L compliant with corresponding metadata.
See also
openeo.org documentation on process “ard_surface_reflectance”.
- array_append(value, label=<object object>)[source]¶
Append a value to an array
- Parameters:
self – An array.
value – Value to append to the array.
label – If the given array is a labeled array, a new label for the new value should be given. If not given or null, the array index as string is used as the label. If in any case the label exists, a LabelExists exception is thrown.
- Return type:
- Returns:
The new array with the value being appended.
See also
openeo.org documentation on process “array_append”.
- array_apply(process, context=<object object>)[source]¶
Apply a process to each array element
- Parameters:
self – An array.
process – A process that accepts and returns a single value and is applied on each individual value in the array. The process may consist of multiple sub-processes and could, for example, consist of processes such as
absolute()
orlinear_scale_range()
.context – Additional data to be passed to the process.
- Return type:
- Returns:
An array with the newly computed values. The number of elements are the same as for the original array.
See also
openeo.org documentation on process “array_apply”.
- array_concat(array2)[source]¶
Merge two arrays
- Parameters:
self – The first array.
array2 – The second array.
- Return type:
- Returns:
The merged array.
See also
openeo.org documentation on process “array_concat”.
- array_contains(value)[source]¶
Check whether the array contains a given value
- Parameters:
self – List to find the value in.
value – Value to find in data. If the value is null, this process returns always false.
- Return type:
- Returns:
true if the list contains the value, false` otherwise.
See also
openeo.org documentation on process “array_contains”.
- array_create(repeat=<object object>)[source]¶
Create an array
- Parameters:
self – A (native) array to fill the newly created array with. Defaults to an empty array.
repeat – The number of times the (native) array specified in data is repeatedly added after each other to the new array being created. Defaults to 1.
- Return type:
- Returns:
The newly created array.
See also
openeo.org documentation on process “array_create”.
- array_create_labeled(labels)[source]¶
Create a labeled array
- Parameters:
self – An array of values to be used.
labels – An array of labels to be used.
- Return type:
- Returns:
The newly created labeled array.
See also
openeo.org documentation on process “array_create_labeled”.
- array_element(index=<object object>, label=<object object>, return_nodata=<object object>)[source]¶
Get an element from an array
- Parameters:
self – An array.
index – The zero-based index of the element to retrieve.
label – The label of the element to retrieve. Throws an ArrayNotLabeled exception, if the given array is not a labeled array and this parameter is set.
return_nodata – By default this process throws an ArrayElementNotAvailable exception if the index or label is invalid. If you want to return null instead, set this flag to true.
- Return type:
- Returns:
The value of the requested element.
See also
openeo.org documentation on process “array_element”.
- array_filter(condition, context=<object object>)[source]¶
Filter an array based on a condition
- Parameters:
self – An array.
condition – A condition that is evaluated against each value, index and/or label in the array. Only the array elements for which the condition returns true are preserved.
context – Additional data to be passed to the condition.
- Return type:
- Returns:
An array filtered by the specified condition. The number of elements are less than or equal compared to the original array.
See also
openeo.org documentation on process “array_filter”.
- array_find(value, reverse=<object object>)[source]¶
Get the index for a value in an array
- Parameters:
self – List to find the value in.
value – Value to find in data. If the value is null, this process returns always null.
reverse – By default, this process finds the index of the first match. To return the index of the last match instead, set this flag to true.
- Return type:
- Returns:
The index of the first element with the specified value. If no element was found, null is returned.
See also
openeo.org documentation on process “array_find”.
- array_find_label(label)[source]¶
Get the index for a label in a labeled array
- Parameters:
self – List to find the label in.
label – Label to find in data.
- Return type:
- Returns:
The index of the element with the specified label assigned. If no such label was found, null is returned.
See also
openeo.org documentation on process “array_find_label”.
- array_interpolate_linear()[source]¶
One-dimensional linear interpolation for arrays
- Parameters:
self – An array of numbers and no-data values. If the given array is a labeled array, the labels must have a natural/inherent label order and the process expects the labels to be sorted accordingly. This is the default behavior in openEO for spatial and temporal dimensions.
- Return type:
- Returns:
An array with no-data values being replaced with interpolated values. If not at least 2 numerical values are available in the array, the array stays the same.
See also
openeo.org documentation on process “array_interpolate_linear”.
- array_labels()[source]¶
Get the labels for an array
- Parameters:
self – An array.
- Return type:
- Returns:
The labels or indices as array.
See also
openeo.org documentation on process “array_labels”.
- array_modify(values, index, length=<object object>)[source]¶
Change the content of an array (remove, insert, update)
- Parameters:
self – The array to modify.
values – The values to insert into the data array.
index – The index in the data array of the element to insert the value(s) before. If the index is greater than the number of elements in the data array, the process throws an ArrayElementNotAvailable exception. To insert after the last element, there are two options: 1. Use the simpler processes
array_append()
to append a single value orarray_concat()
to append multiple values. 2. Specify the number of elements in the array. You can retrieve the number of elements with the processcount()
, having the parameter condition set to true.length – The number of elements in the data array to remove (or replace) starting from the given index. If the array contains fewer elements, the process simply removes all elements up to the end.
- Return type:
- Returns:
An array with values added, updated or removed.
See also
openeo.org documentation on process “array_modify”.
- arsinh()[source]¶
Inverse hyperbolic sine
- Parameters:
self – A number.
- Return type:
- Returns:
The computed angle in radians.
See also
openeo.org documentation on process “arsinh”.
- artanh()[source]¶
Inverse hyperbolic tangent
- Parameters:
self – A number.
- Return type:
- Returns:
The computed angle in radians.
See also
openeo.org documentation on process “artanh”.
- atmospheric_correction(method, elevation_model=<object object>, options=<object object>)[source]¶
Apply atmospheric correction
- Parameters:
self – Data cube containing multi-spectral optical top of atmosphere reflectances to be corrected.
method – The atmospheric correction method to use. To get reproducible results, you have to set a specific method. Set to null to allow the back-end to choose, which will improve portability, but reduce reproducibility as you may get different results if you run the processes multiple times.
elevation_model – The digital elevation model to use. Set to null (the default) to allow the back-end to choose, which will improve portability, but reduce reproducibility.
options – Proprietary options for the atmospheric correction method. Specifying proprietary options will reduce portability.
- Return type:
- Returns:
Data cube containing bottom of atmosphere reflectances.
See also
openeo.org documentation on process “atmospheric_correction”.
- between(min, max, exclude_max=<object object>)[source]¶
Between comparison
- Parameters:
self – The value to check.
min – Lower boundary (inclusive) to check against.
max – Upper boundary (inclusive) to check against.
exclude_max – Exclude the upper boundary max if set to true. Defaults to false.
- Return type:
- Returns:
true if x is between the specified bounds, otherwise false.
See also
openeo.org documentation on process “between”.
- ceil()[source]¶
Round fractions up
- Parameters:
self – A number to round up.
- Return type:
- Returns:
The number rounded up.
See also
openeo.org documentation on process “ceil”.
- climatological_normal(period, climatology_period=<object object>)[source]¶
Compute climatology normals
- Parameters:
self – A data cube with exactly one temporal dimension. The data cube must span at least the temporal interval specified in the parameter climatology-period. Seasonal periods may span two consecutive years, e.g. temporal winter that includes months December, January and February. If the required months before the actual climate period are available, the season is taken into account. If not available, the first season is not taken into account and the seasonal mean is based on one year less than the other seasonal normals. The incomplete season at the end of the last year is never taken into account.
period – The time intervals to aggregate the average value for. The following pre-defined frequencies are supported: * day: Day of the year * month: Month of the year * climatology- period: The period specified in the climatology-period. * season: Three month periods of the calendar seasons (December - February, March - May, June - August, September - November). * tropical- season: Six month periods of the tropical seasons (November - April, May - October).
climatology_period – The climatology period as a closed temporal interval. The first element of the array is the first year to be fully included in the temporal interval. The second element is the last year to be fully included in the temporal interval. The default period is from 1981 until 2010 (both inclusive).
- Return type:
- Returns:
A data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged, except for the resolution and dimension labels of the temporal dimension. The temporal dimension has the following dimension labels: * day: 001 - 365 * month: 01 - 12 * climatology-period: climatology-period * season: djf (December - February), mam (March - May), jja (June - August), son (September - November) * tropical- season: ndjfma (November - April), mjjaso (May - October)
See also
openeo.org documentation on process “climatological_normal”.
- clip(min, max)[source]¶
Clip a value between a minimum and a maximum
- Parameters:
self – A number.
min – Minimum value. If the value is lower than this value, the process will return the value of this parameter.
max – Maximum value. If the value is greater than this value, the process will return the value of this parameter.
- Return type:
- Returns:
The value clipped to the specified range.
See also
openeo.org documentation on process “clip”.
- cloud_detection(method, options=<object object>)[source]¶
Create cloud masks
- Parameters:
self – The source data cube containing multi-spectral optical top of the atmosphere (TOA) reflectances on which to perform cloud detection.
method – The cloud detection method to use. To get reproducible results, you have to set a specific method. Set to null to allow the back-end to choose, which will improve portability, but reduce reproducibility as you may get different results if you run the processes multiple times.
options – Proprietary options for the cloud detection method. Specifying proprietary options will reduce portability.
- Return type:
- Returns:
A data cube with bands for the atmospheric disturbances. Each of the masks contains values between 0 and 1. The data cube has the same spatial and temporal dimensions as the source data cube and a dimension that contains a dimension label for each of the supported/considered atmospheric disturbance.
See also
openeo.org documentation on process “cloud_detection”.
- constant()[source]¶
Define a constant value
- Parameters:
self – The value of the constant.
- Return type:
- Returns:
The value of the constant.
See also
openeo.org documentation on process “constant”.
- cos()[source]¶
Cosine
- Parameters:
self – An angle in radians.
- Return type:
- Returns:
The computed cosine of x.
See also
openeo.org documentation on process “cos”.
- cosh()[source]¶
Hyperbolic cosine
- Parameters:
self – An angle in radians.
- Return type:
- Returns:
The computed hyperbolic cosine of x.
See also
openeo.org documentation on process “cosh”.
- count(condition=<object object>, context=<object object>)[source]¶
Count the number of elements
- Parameters:
self – An array with elements of any data type.
condition – A condition consists of one or more processes, which in the end return a boolean value. It is evaluated against each element in the array. An element is counted only if the condition returns true. Defaults to count valid elements in a list (see
is_valid()
). Setting this parameter to boolean true counts all elements in the list.context – Additional data to be passed to the condition.
- Return type:
- Returns:
The counted number of elements.
See also
openeo.org documentation on process “count”.
- create_raster_cube()[source]¶
Create an empty raster data cube
- Return type:
- Returns:
An empty raster data cube with zero dimensions.
See also
openeo.org documentation on process “create_raster_cube”.
- cummax(ignore_nodata=<object object>)[source]¶
Cumulative maxima
- Parameters:
self – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not and ignores them by default. Setting this flag to false considers no-data values so that null is set for all the following elements.
- Return type:
- Returns:
An array with the computed cumulative maxima.
See also
openeo.org documentation on process “cummax”.
- cummin(ignore_nodata=<object object>)[source]¶
Cumulative minima
- Parameters:
self – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not and ignores them by default. Setting this flag to false considers no-data values so that null is set for all the following elements.
- Return type:
- Returns:
An array with the computed cumulative minima.
See also
openeo.org documentation on process “cummin”.
- cumproduct(ignore_nodata=<object object>)[source]¶
Cumulative products
- Parameters:
self – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not and ignores them by default. Setting this flag to false considers no-data values so that null is set for all the following elements.
- Return type:
- Returns:
An array with the computed cumulative products.
See also
openeo.org documentation on process “cumproduct”.
- cumsum(ignore_nodata=<object object>)[source]¶
Cumulative sums
- Parameters:
self – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not and ignores them by default. Setting this flag to false considers no-data values so that null is set for all the following elements.
- Return type:
- Returns:
An array with the computed cumulative sums.
See also
openeo.org documentation on process “cumsum”.
- date_shift(value, unit)[source]¶
Manipulates dates and times by addition or subtraction
- Parameters:
self – The date (and optionally time) to manipulate. If the given date doesn’t include the time, the process assumes that the time component is 00:00:00Z (i.e. midnight, in UTC). The millisecond part of the time is optional and defaults to 0 if not given.
value – The period of time in the unit given that is added (positive numbers) or subtracted (negative numbers). The value 0 doesn’t have any effect.
unit – The unit for the value given. The following pre-defined units are available: - millisecond: Milliseconds - second: Seconds - leap seconds are ignored in computations. - minute: Minutes - hour: Hours - day: Days - changes only the the day part of a date - week: Weeks (equivalent to 7 days) - month: Months - year: Years Manipulations with the unit year, month, week or day do never change the time. If any of the manipulations result in an invalid date or time, the corresponding part is rounded down to the next valid date or time respectively. For example, adding a month to 2020-01-31 would result in 2020-02-29.
- Return type:
- Returns:
The manipulated date. If a time component was given in the parameter date, the time component is returned with the date.
See also
openeo.org documentation on process “date_shift”.
- dimension_labels(dimension)[source]¶
Get the dimension labels
- Parameters:
self – The data cube.
dimension – The name of the dimension to get the labels for.
- Return type:
- Returns:
The labels as an array.
See also
openeo.org documentation on process “dimension_labels”.
- divide(y)[source]¶
Division of two numbers
- Parameters:
self – The dividend.
y – The divisor.
- Return type:
- Returns:
The computed result.
See also
openeo.org documentation on process “divide”.
- drop_dimension(name)[source]¶
Remove a dimension
- Parameters:
self – The data cube to drop a dimension from.
name – Name of the dimension to drop.
- Return type:
- Returns:
A data cube without the specified dimension. The number of dimensions decreases by one, but the dimension properties (name, type, labels, reference system and resolution) for all other dimensions remain unchanged.
See also
openeo.org documentation on process “drop_dimension”.
- e()[source]¶
Euler’s number (e)
- Return type:
- Returns:
The numerical value of Euler’s number.
See also
openeo.org documentation on process “e”.
- eq(y, delta=<object object>, case_sensitive=<object object>)[source]¶
Equal to comparison
- Parameters:
self – First operand.
y – Second operand.
delta – Only applicable for comparing two numbers. If this optional parameter is set to a positive non-zero number the equality of two numbers is checked against a delta value. This is especially useful to circumvent problems with floating-point inaccuracy in machine-based computation. This option is basically an alias for the following computation: lte(abs(minus([x, y]), delta)
case_sensitive – Only applicable for comparing two strings. Case sensitive comparison can be disabled by setting this parameter to false.
- Return type:
- Returns:
true if x is equal to y, null if any operand is null, otherwise false.
See also
openeo.org documentation on process “eq”.
- exp()[source]¶
Exponentiation to the base e
- Parameters:
self – The numerical exponent.
- Return type:
- Returns:
The computed value for e raised to the power of p.
See also
openeo.org documentation on process “exp”.
- extrema(ignore_nodata=<object object>)[source]¶
Minimum and maximum values
- Parameters:
self – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that an array with two null values is returned if any value is such a value.
- Return type:
- Returns:
An array containing the minimum and maximum values for the specified numbers. The first element is the minimum, the second element is the maximum. If the input array is empty both elements are set to null.
See also
openeo.org documentation on process “extrema”.
- filter_bands(bands=<object object>, wavelengths=<object object>)[source]¶
Filter the bands by names
- Parameters:
self – A data cube with bands.
bands – A list of band names. Either the unique band name (metadata field name in bands) or one of the common band names (metadata field common_name in bands). If the unique band name and the common name conflict, the unique band name has a higher priority. The order of the specified array defines the order of the bands in the data cube. If multiple bands match a common name, all matched bands are included in the original order.
wavelengths – A list of sub-lists with each sub-list consisting of two elements. The first element is the minimum wavelength and the second element is the maximum wavelength. Wavelengths are specified in micrometers (μm). The order of the specified array defines the order of the bands in the data cube. If multiple bands match the wavelengths, all matched bands are included in the original order.
- Return type:
- Returns:
A data cube limited to a subset of its original bands. The dimensions and dimension properties (name, type, labels, reference system and resolution) remain unchanged, except that the dimension of type bands has less (or the same) dimension labels.
See also
openeo.org documentation on process “filter_bands”.
- filter_bbox(extent)[source]¶
Spatial filter using a bounding box
- Parameters:
self – A data cube.
extent – A bounding box, which may include a vertical axis (see base and height).
- Return type:
- Returns:
A data cube restricted to the bounding box. The dimensions and dimension properties (name, type, labels, reference system and resolution) remain unchanged, except that the spatial dimensions have less (or the same) dimension labels.
See also
openeo.org documentation on process “filter_bbox”.
- filter_labels(condition, dimension, context=<object object>)[source]¶
Filter dimension labels based on a condition
- Parameters:
self – A data cube.
condition – A condition that is evaluated against each dimension label in the specified dimension. A dimension label and the corresponding data is preserved for the given dimension, if the condition returns true.
dimension – The name of the dimension to filter on. Fails with a DimensionNotAvailable exception if the specified dimension does not exist.
context – Additional data to be passed to the condition.
- Return type:
- Returns:
A data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged, except that the given dimension has less (or the same) dimension labels.
See also
openeo.org documentation on process “filter_labels”.
- filter_spatial(geometries)[source]¶
Spatial filter using geometries
- Parameters:
self – A data cube.
geometries – One or more geometries used for filtering, specified as GeoJSON.
- Return type:
- Returns:
A data cube restricted to the specified geometries. The dimensions and dimension properties (name, type, labels, reference system and resolution) remain unchanged, except that the spatial dimensions have less (or the same) dimension labels.
See also
openeo.org documentation on process “filter_spatial”.
- filter_temporal(extent, dimension=<object object>)[source]¶
Temporal filter based on temporal intervals
- Parameters:
self – A data cube.
extent – Left-closed temporal interval, i.e. an array with exactly two elements: 1. The first element is the start of the temporal interval. The specified instance in time is included in the interval. 2. The second element is the end of the temporal interval. The specified instance in time is excluded from the interval. The specified temporal strings follow [RFC 3339](https://www.rfc- editor.org/rfc/rfc3339.html). Also supports open intervals by setting one of the boundaries to null, but never both.
dimension – The name of the temporal dimension to filter on. If no specific dimension is specified or it is set to null, the filter applies to all temporal dimensions. Fails with a DimensionNotAvailable exception if the specified dimension does not exist.
- Return type:
- Returns:
A data cube restricted to the specified temporal extent. The dimensions and dimension properties (name, type, labels, reference system and resolution) remain unchanged, except that the temporal dimensions (determined by dimensions parameter) may have less dimension labels.
See also
openeo.org documentation on process “filter_temporal”.
- first(ignore_nodata=<object object>)[source]¶
First element
- Parameters:
self – An array with elements of any data type.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if the first value is such a value.
- Return type:
- Returns:
The first element of the input array.
See also
openeo.org documentation on process “first”.
- fit_class_random_forest(target, max_variables, num_trees=<object object>, seed=<object object>)[source]¶
Train a random forest classification model
- Parameters:
self – The predictors for the classification model as a vector data cube. Aggregated to the features (vectors) of the target input variable.
target – The training sites for the classification model as a vector data cube. This is associated with the target variable for the Random Forest model. The geometry has to associated with a value to predict (e.g. fractional forest canopy cover).
max_variables – Specifies how many split variables will be used at a node. The following options are available: - integer: The given number of variables are considered for each split. - all: All variables are considered for each split. - log2: The logarithm with base 2 of the number of variables are considered for each split. - onethird: A third of the number of variables are considered for each split. - sqrt: The square root of the number of variables are considered for each split. This is often the default for classification.
num_trees – The number of trees build within the Random Forest classification.
seed – A randomization seed to use for the random sampling in training. If not given or null, no seed is used and results may differ on subsequent use.
- Return type:
- Returns:
A model object that can be saved with
save_ml_model()
and restored withload_ml_model()
.
See also
openeo.org documentation on process “fit_class_random_forest”.
- fit_curve(parameters, function, dimension)[source]¶
Curve fitting
- Parameters:
self – A data cube.
parameters – Defined the number of parameters for the model function and provides an initial guess for them. At least one parameter is required.
function – The model function. It must take the parameters to fit as array through the first argument and the independent variable x as the second argument. It is recommended to store the model function as a user-defined process on the back-end to be able to re-use the model function with the computed optimal values for the parameters afterwards.
dimension – The name of the dimension for curve fitting. Must be a dimension with labels that have a order (i.e. numerical labels or a temporal dimension). Fails with a DimensionNotAvailable exception if the specified dimension does not exist.
- Return type:
- Returns:
A data cube with the optimal values for the parameters.
See also
openeo.org documentation on process “fit_curve”.
- fit_regr_random_forest(target, max_variables, num_trees=<object object>, seed=<object object>)[source]¶
Train a random forest regression model
- Parameters:
self – The predictors for the regression model as a vector data cube. Aggregated to the features (vectors) of the target input variable.
target – The training sites for the regression model as a vector data cube. This is associated with the target variable for the Random Forest model. The geometry has to associated with a value to predict (e.g. fractional forest canopy cover).
max_variables – Specifies how many split variables will be used at a node. The following options are available: - integer: The given number of variables are considered for each split. - all: All variables are considered for each split. - log2: The logarithm with base 2 of the number of variables are considered for each split. - onethird: A third of the number of variables are considered for each split. This is often the default for regression. - sqrt: The square root of the number of variables are considered for each split.
num_trees – The number of trees build within the Random Forest regression.
seed – A randomization seed to use for the random sampling in training. If not given or null, no seed is used and results may differ on subsequent use.
- Return type:
- Returns:
A model object that can be saved with
save_ml_model()
and restored withload_ml_model()
.
See also
openeo.org documentation on process “fit_regr_random_forest”.
- flatten_dimensions(dimensions, target_dimension, label_separator=<object object>)[source]¶
Combine multiple dimensions into a single dimension
- Parameters:
self – A data cube.
dimensions – The names of the dimension to combine. The order of the array defines the order in which the dimension labels and values are combined (see the example in the process description). Fails with a DimensionNotAvailable exception if at least one of the specified dimensions does not exist.
target_dimension – The name of the new target dimension. A new dimensions will be created with the given names and type other (see
add_dimension()
). Fails with a TargetDimensionExists exception if a dimension with the specified name exists.label_separator – The string that will be used as a separator for the concatenated dimension labels. To unambiguously revert the dimension labels with the process
unflatten_dimension()
, the given string must not be contained in any of the dimension labels.
- Return type:
- Returns:
A data cube with the new shape. The dimension properties (name, type, labels, reference system and resolution) for all other dimensions remain unchanged.
See also
openeo.org documentation on process “flatten_dimensions”.
- floor()[source]¶
Round fractions down
- Parameters:
self – A number to round down.
- Return type:
- Returns:
The number rounded down.
See also
openeo.org documentation on process “floor”.
- gt(y)[source]¶
Greater than comparison
- Parameters:
self – First operand.
y – Second operand.
- Return type:
- Returns:
true if x is strictly greater than y or null if any operand is null, otherwise false.
See also
openeo.org documentation on process “gt”.
- gte(y)[source]¶
Greater than or equal to comparison
- Parameters:
self – First operand.
y – Second operand.
- Return type:
- Returns:
true if x is greater than or equal to y, null if any operand is null, otherwise false.
See also
openeo.org documentation on process “gte”.
- if_(accept, reject=<object object>)[source]¶
If-Then-Else conditional
- Parameters:
self – A boolean value.
accept – A value that is returned if the boolean value is true.
reject – A value that is returned if the boolean value is not true. Defaults to null.
- Return type:
- Returns:
Either the accept or reject argument depending on the given boolean value.
See also
openeo.org documentation on process “if_”.
- inspect(code=<object object>, level=<object object>, message=<object object>)[source]¶
Add information to the logs
- Parameters:
self – Data to log.
code – A label to help identify one or more log entries originating from this process in the list of all log entries. It can help to group or filter log entries and is usually not unique.
level – The severity level of this message, defaults to info.
message – A message to send in addition to the data.
- Return type:
- Returns:
The data as passed to the data parameter without any modification.
See also
openeo.org documentation on process “inspect”.
- int()[source]¶
Integer part of a number
- Parameters:
self – A number.
- Return type:
- Returns:
Integer part of the number.
See also
openeo.org documentation on process “int”.
- is_infinite()[source]¶
Value is an infinite number
- Parameters:
self – The data to check.
- Return type:
- Returns:
true if the data is an infinite number, otherwise false.
See also
openeo.org documentation on process “is_infinite”.
- is_nan()[source]¶
Value is not a number
- Parameters:
self – The data to check.
- Return type:
- Returns:
true if the data is not a number, otherwise false.
See also
openeo.org documentation on process “is_nan”.
- is_nodata()[source]¶
Value is a no-data value
- Parameters:
self – The data to check.
- Return type:
- Returns:
true if the data is a no-data value, otherwise false.
See also
openeo.org documentation on process “is_nodata”.
- is_valid()[source]¶
Value is valid data
- Parameters:
self – The data to check.
- Return type:
- Returns:
true if the data is valid, otherwise false.
See also
openeo.org documentation on process “is_valid”.
- last(ignore_nodata=<object object>)[source]¶
Last element
- Parameters:
self – An array with elements of any data type.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if the last value is such a value.
- Return type:
- Returns:
The last element of the input array.
See also
openeo.org documentation on process “last”.
- linear_scale_range(inputMin, inputMax, outputMin=<object object>, outputMax=<object object>)[source]¶
Linear transformation between two ranges
- Parameters:
self – A number to transform. The number gets clipped to the bounds specified in inputMin and inputMax.
inputMin – Minimum value the input can obtain.
inputMax – Maximum value the input can obtain.
outputMin – Minimum value of the desired output range.
outputMax – Maximum value of the desired output range.
- Return type:
- Returns:
The transformed number.
See also
openeo.org documentation on process “linear_scale_range”.
- ln()[source]¶
Natural logarithm
- Parameters:
self – A number to compute the natural logarithm for.
- Return type:
- Returns:
The computed natural logarithm.
See also
openeo.org documentation on process “ln”.
- load_collection(spatial_extent, temporal_extent, bands=<object object>, properties=<object object>)[source]¶
Load a collection
- Parameters:
self – The collection id.
spatial_extent – Limits the data to load from the collection to the specified bounding box or polygons. The process puts a pixel into the data cube if the point at the pixel center intersects with the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC). The GeoJSON can be one of the following feature types: * A Polygon or MultiPolygon geometry, * a Feature with a Polygon or MultiPolygon geometry, * a FeatureCollection containing at least one Feature with Polygon or MultiPolygon geometries, or * a GeometryCollection containing Polygon or MultiPolygon geometries. To maximize interoperability, GeometryCollection should be avoided in favour of one of the alternatives above. Set this parameter to null to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using
filter_bbox()
orfilter_spatial()
directly after loading unbounded data.temporal_extent – Limits the data to load from the collection to the specified left-closed temporal interval. Applies to all temporal dimensions. The interval has to be specified as an array with exactly two elements: 1. The first element is the start of the temporal interval. The specified instance in time is included in the interval. 2. The second element is the end of the temporal interval. The specified instance in time is excluded from the interval. The specified temporal strings follow [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html). Also supports open intervals by setting one of the boundaries to null, but never both. Set this parameter to null to set no limit for the temporal extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using
filter_temporal()
directly after loading unbounded data.bands – Only adds the specified bands into the data cube so that bands that don’t match the list of band names are not available. Applies to all dimensions of type bands. Either the unique band name (metadata field name in bands) or one of the common band names (metadata field common_name in bands) can be specified. If the unique band name and the common name conflict, the unique band name has a higher priority. The order of the specified array defines the order of the bands in the data cube. If multiple bands match a common name, all matched bands are included in the original order. It is recommended to use this parameter instead of using
filter_bands()
directly after loading unbounded data.properties – Limits the data by metadata properties to include only data in the data cube which all given conditions return true for (AND operation). Specify key-value-pairs with the key being the name of the metadata property, which can be retrieved with the openEO Data Discovery for Collections. The value must be a condition (user-defined process) to be evaluated against the collection metadata, see the example.
- Return type:
- Returns:
A data cube for further processing. The dimensions and dimension properties (name, type, labels, reference system and resolution) correspond to the collection’s metadata, but the dimension labels are restricted as specified in the parameters.
See also
openeo.org documentation on process “load_collection”.
- load_ml_model()[source]¶
Load a ML model
- Parameters:
self – The STAC Item to load the machine learning model from. The STAC Item must implement the ml-model extension.
- Return type:
- Returns:
A machine learning model to be used with machine learning processes such as
predict_random_forest()
.
See also
openeo.org documentation on process “load_ml_model”.
- load_result(spatial_extent=<object object>, temporal_extent=<object object>, bands=<object object>)[source]¶
Load batch job results
- Parameters:
self – The id of a batch job with results.
spatial_extent – Limits the data to load from the batch job result to the specified bounding box or polygons. The process puts a pixel into the data cube if the point at the pixel center intersects with the bounding box or any of the polygons (as defined in the Simple Features standard by the OGC). The GeoJSON can be one of the following feature types: * A Polygon or MultiPolygon geometry, * a Feature with a Polygon or MultiPolygon geometry, * a FeatureCollection containing at least one Feature with Polygon or MultiPolygon geometries, or * a GeometryCollection containing Polygon or MultiPolygon geometries. To maximize interoperability, GeometryCollection should be avoided in favour of one of the alternatives above. Set this parameter to null to set no limit for the spatial extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using
filter_bbox()
orfilter_spatial()
directly after loading unbounded data.temporal_extent – Limits the data to load from the batch job result to the specified left-closed temporal interval. Applies to all temporal dimensions. The interval has to be specified as an array with exactly two elements: 1. The first element is the start of the temporal interval. The specified instance in time is included in the interval. 2. The second element is the end of the temporal interval. The specified instance in time is excluded from the interval. The specified temporal strings follow [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html). Also supports open intervals by setting one of the boundaries to null, but never both. Set this parameter to null to set no limit for the temporal extent. Be careful with this when loading large datasets! It is recommended to use this parameter instead of using
filter_temporal()
directly after loading unbounded data.bands – Only adds the specified bands into the data cube so that bands that don’t match the list of band names are not available. Applies to all dimensions of type bands. Either the unique band name (metadata field name in bands) or one of the common band names (metadata field common_name in bands) can be specified. If the unique band name and the common name conflict, the unique band name has a higher priority. The order of the specified array defines the order of the bands in the data cube. If multiple bands match a common name, all matched bands are included in the original order. It is recommended to use this parameter instead of using
filter_bands()
directly after loading unbounded data.
- Return type:
- Returns:
A data cube for further processing.
See also
openeo.org documentation on process “load_result”.
- load_uploaded_files(format, options=<object object>)[source]¶
Load files from the user workspace
- Parameters:
self – The files to read. Folders can’t be specified, specify all files instead. An exception is thrown if a file can’t be read.
format – The file format to read from. It must be one of the values that the server reports as supported input file formats, which usually correspond to the short GDAL/OGR codes. If the format is not suitable for loading the data, a FormatUnsuitable exception will be thrown. This parameter is case insensitive.
options – The file format parameters to be used to read the files. Must correspond to the parameters that the server reports as supported parameters for the chosen format. The parameter names and valid values usually correspond to the GDAL/OGR format options.
- Return type:
- Returns:
A data cube for further processing.
See also
openeo.org documentation on process “load_uploaded_files”.
- log(base)[source]¶
Logarithm to a base
- Parameters:
self – A number to compute the logarithm for.
base – The numerical base.
- Return type:
- Returns:
The computed logarithm.
See also
openeo.org documentation on process “log”.
- lt(y)[source]¶
Less than comparison
- Parameters:
self – First operand.
y – Second operand.
- Return type:
- Returns:
true if x is strictly less than y, null if any operand is null, otherwise false.
See also
openeo.org documentation on process “lt”.
- lte(y)[source]¶
Less than or equal to comparison
- Parameters:
self – First operand.
y – Second operand.
- Return type:
- Returns:
true if x is less than or equal to y, null if any operand is null, otherwise false.
See also
openeo.org documentation on process “lte”.
- mask(mask, replacement=<object object>)[source]¶
Apply a raster mask
- Parameters:
self – A raster data cube.
mask – A mask as a raster data cube. Every pixel in data must have a corresponding element in mask.
replacement – The value used to replace masked values with.
- Return type:
- Returns:
A masked raster data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged.
See also
openeo.org documentation on process “mask”.
- mask_polygon(mask, replacement=<object object>, inside=<object object>)[source]¶
Apply a polygon mask
- Parameters:
self – A raster data cube.
mask – A GeoJSON object containing at least one polygon. The provided feature types can be one of the following: * A Polygon or MultiPolygon geometry, * a Feature with a Polygon or MultiPolygon geometry, * a FeatureCollection containing at least one Feature with Polygon or MultiPolygon geometries, or * a GeometryCollection containing Polygon or MultiPolygon geometries. To maximize interoperability, GeometryCollection should be avoided in favour of one of the alternatives above.
replacement – The value used to replace masked values with.
inside – If set to true all pixels for which the point at the pixel center does intersect with any polygon are replaced.
- Return type:
- Returns:
A masked raster data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged.
See also
openeo.org documentation on process “mask_polygon”.
- max(ignore_nodata=<object object>)[source]¶
Maximum value
- Parameters:
self – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if any value is such a value.
- Return type:
- Returns:
The maximum value.
See also
openeo.org documentation on process “max”.
- mean(ignore_nodata=<object object>)[source]¶
Arithmetic mean (average)
- Parameters:
self – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if any value is such a value.
- Return type:
- Returns:
The computed arithmetic mean.
See also
openeo.org documentation on process “mean”.
- median(ignore_nodata=<object object>)[source]¶
Statistical median
- Parameters:
self – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if any value is such a value.
- Return type:
- Returns:
The computed statistical median.
See also
openeo.org documentation on process “median”.
- merge_cubes(cube2, overlap_resolver=<object object>, context=<object object>)[source]¶
Merge two data cubes
- Parameters:
self – The first data cube.
cube2 – The second data cube.
overlap_resolver – A reduction operator that resolves the conflict if the data overlaps. The reducer must return a value of the same data type as the input values are. The reduction operator may be a single process such as
multiply()
or consist of multiple sub-processes. null (the default) can be specified if no overlap resolver is required.context – Additional data to be passed to the overlap resolver.
- Return type:
- Returns:
The merged data cube. See the process description for details regarding the dimensions and dimension properties (name, type, labels, reference system and resolution).
See also
openeo.org documentation on process “merge_cubes”.
- min(ignore_nodata=<object object>)[source]¶
Minimum value
- Parameters:
self – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if any value is such a value.
- Return type:
- Returns:
The minimum value.
See also
openeo.org documentation on process “min”.
- mod(y)[source]¶
Modulo
- Parameters:
self – A number to be used as the dividend.
y – A number to be used as the divisor.
- Return type:
- Returns:
The remainder after division.
See also
openeo.org documentation on process “mod”.
- multiply(y)[source]¶
Multiplication of two numbers
- Parameters:
self – The multiplier.
y – The multiplicand.
- Return type:
- Returns:
The computed product of the two numbers.
See also
openeo.org documentation on process “multiply”.
- nan()[source]¶
Not a Number (NaN)
- Return type:
- Returns:
Returns NaN.
See also
openeo.org documentation on process “nan”.
- ndvi(nir=<object object>, red=<object object>, target_band=<object object>)[source]¶
Normalized Difference Vegetation Index
- Parameters:
self – A raster data cube with two bands that have the common names red and nir assigned.
nir – The name of the NIR band. Defaults to the band that has the common name nir assigned. Either the unique band name (metadata field name in bands) or one of the common band names (metadata field common_name in bands) can be specified. If the unique band name and the common name conflict, the unique band name has a higher priority.
red – The name of the red band. Defaults to the band that has the common name red assigned. Either the unique band name (metadata field name in bands) or one of the common band names (metadata field common_name in bands) can be specified. If the unique band name and the common name conflict, the unique band name has a higher priority.
target_band – By default, the dimension of type bands is dropped. To keep the dimension specify a new band name in this parameter so that a new dimension label with the specified name will be added for the computed values.
- Return type:
- Returns:
A raster data cube containing the computed NDVI values. The structure of the data cube differs depending on the value passed to target_band: * target_band is null: The data cube does not contain the dimension of type bands, the number of dimensions decreases by one. The dimension properties (name, type, labels, reference system and resolution) for all other dimensions remain unchanged. * target_band is a string: The data cube keeps the same dimensions. The dimension properties remain unchanged, but the number of dimension labels for the dimension of type bands increases by one. The additional label is named as specified in target_band.
See also
openeo.org documentation on process “ndvi”.
- neq(y, delta=<object object>, case_sensitive=<object object>)[source]¶
Not equal to comparison
- Parameters:
self – First operand.
y – Second operand.
delta – Only applicable for comparing two numbers. If this optional parameter is set to a positive non-zero number the non-equality of two numbers is checked against a delta value. This is especially useful to circumvent problems with floating-point inaccuracy in machine-based computation. This option is basically an alias for the following computation: gt(abs(minus([x, y]), delta)
case_sensitive – Only applicable for comparing two strings. Case sensitive comparison can be disabled by setting this parameter to false.
- Return type:
- Returns:
true if x is not equal to y, null if any operand is null, otherwise false.
See also
openeo.org documentation on process “neq”.
- normalized_difference(y)[source]¶
Normalized difference
- Parameters:
self – The value for the first band.
y – The value for the second band.
- Return type:
- Returns:
The computed normalized difference.
See also
openeo.org documentation on process “normalized_difference”.
- not_()[source]¶
Inverting a boolean
- Parameters:
self – Boolean value to invert.
- Return type:
- Returns:
Inverted boolean value.
See also
openeo.org documentation on process “not_”.
- or_(y)[source]¶
Logical OR
- Parameters:
self – A boolean value.
y – A boolean value.
- Return type:
- Returns:
Boolean result of the logical OR.
See also
openeo.org documentation on process “or_”.
- order(asc=<object object>, nodata=<object object>)[source]¶
Create a permutation
- Parameters:
self – An array to compute the order for.
asc – The default sort order is ascending, with smallest values first. To sort in reverse (descending) order, set this parameter to false.
nodata – Controls the handling of no-data values (null). By default, they are removed. If set to true, missing values in the data are put last; if set to false, they are put first.
- Return type:
- Returns:
The computed permutation.
See also
openeo.org documentation on process “order”.
- pi()[source]¶
Pi (π)
- Return type:
- Returns:
The numerical value of Pi.
See also
openeo.org documentation on process “pi”.
- power(p)[source]¶
Exponentiation
- Parameters:
self – The numerical base.
p – The numerical exponent.
- Return type:
- Returns:
The computed value for base raised to the power of p.
See also
openeo.org documentation on process “power”.
- predict_curve(parameters, function, dimension, labels=<object object>)[source]¶
Predict values
- Parameters:
self – A data cube to predict values for.
parameters – A data cube with optimal values from a result of e.g.
fit_curve()
.function – The model function. It must take the parameters to fit as array through the first argument and the independent variable x as the second argument. It is recommended to store the model function as a user-defined process on the back-end.
dimension – The name of the dimension for predictions. Fails with a DimensionNotAvailable exception if the specified dimension does not exist.
labels – The labels to predict values for. If no labels are given, predicts values only for no- data (null) values in the data cube.
- Return type:
- Returns:
A data cube with the predicted values.
See also
openeo.org documentation on process “predict_curve”.
- predict_random_forest(model)[source]¶
Predict values from a Random Forest model
- Parameters:
self – An array of numbers.
model – A model object that can be trained with the processes
fit_regr_random_forest()
(regression) andfit_class_random_forest()
(classification).
- Return type:
- Returns:
The predicted value. Returns null if any of the given values in the array is a no-data value.
See also
openeo.org documentation on process “predict_random_forest”.
- product(ignore_nodata=<object object>)[source]¶
Compute the product by multiplying numbers
- Parameters:
self – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if any value is such a value.
- Return type:
- Returns:
The computed product of the sequence of numbers.
See also
openeo.org documentation on process “product”.
- quantiles(probabilities=<object object>, q=<object object>, ignore_nodata=<object object>)[source]¶
Quantiles
- Parameters:
self – An array of numbers.
probabilities – A list of probabilities to calculate quantiles for. The probabilities must be between 0 and 1 (inclusive).
q – Number of intervals to calculate quantiles for. Calculates q-quantiles with equal-sized intervals.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that an array with null values is returned if any element is such a value.
- Return type:
- Returns:
An array with the computed quantiles. The list has either * as many elements as the given list of probabilities had or * `q`-1 elements. If the input array is empty the resulting array is filled with as many null values as required according to the list above. See the ‘Empty array’ example for an example.
See also
openeo.org documentation on process “quantiles”.
- rearrange(order)[source]¶
Rearrange an array based on a permutation
- Parameters:
self – The array to rearrange.
order – The permutation used for rearranging.
- Return type:
- Returns:
The rearranged array.
See also
openeo.org documentation on process “rearrange”.
- reduce_dimension(reducer, dimension, context=<object object>)[source]¶
Reduce dimensions
- Parameters:
self – A data cube.
reducer – A reducer to apply on the specified dimension. A reducer is a single process such as
mean()
or a set of processes, which computes a single value for a list of values, see the category ‘reducer’ for such processes.dimension – The name of the dimension over which to reduce. Fails with a DimensionNotAvailable exception if the specified dimension does not exist.
context – Additional data to be passed to the reducer.
- Return type:
- Returns:
A data cube with the newly computed values. It is missing the given dimension, the number of dimensions decreases by one. The dimension properties (name, type, labels, reference system and resolution) for all other dimensions remain unchanged.
See also
openeo.org documentation on process “reduce_dimension”.
- reduce_spatial(reducer, context=<object object>)[source]¶
Reduce spatial dimensions ‘x’ and ‘y’
- Parameters:
self – A data cube.
reducer – A reducer to apply on the horizontal spatial dimensions. A reducer is a single process such as
mean()
or a set of processes, which computes a single value for a list of values, see the category ‘reducer’ for such processes.context – Additional data to be passed to the reducer.
- Return type:
- Returns:
A data cube with the newly computed values. It is missing the horizontal spatial dimensions, the number of dimensions decreases by two. The dimension properties (name, type, labels, reference system and resolution) for all other dimensions remain unchanged.
See also
openeo.org documentation on process “reduce_spatial”.
- rename_dimension(source, target)[source]¶
Rename a dimension
- Parameters:
self – The data cube.
source – The current name of the dimension. Fails with a DimensionNotAvailable exception if the specified dimension does not exist.
target – A new Name for the dimension. Fails with a DimensionExists exception if a dimension with the specified name exists.
- Return type:
- Returns:
A data cube with the same dimensions, but the name of one of the dimensions changes. The old name can not be referred to any longer. The dimension properties (name, type, labels, reference system and resolution) remain unchanged.
See also
openeo.org documentation on process “rename_dimension”.
- rename_labels(dimension, target, source=<object object>)[source]¶
Rename dimension labels
- Parameters:
self – The data cube.
dimension – The name of the dimension to rename the labels for.
target – The new names for the labels. If a target dimension label already exists in the data cube, a LabelExists exception is thrown.
source – The original names of the labels to be renamed to corresponding array elements in the parameter target. It is allowed to only specify a subset of labels to rename, as long as the target and source parameter have the same length. The order of the labels doesn’t need to match the order of the dimension labels in the data cube. By default, the array is empty so that the dimension labels in the data cube are expected to be enumerated. If the dimension labels are not enumerated and the given array is empty, the LabelsNotEnumerated exception is thrown. If one of the source dimension labels doesn’t exist, the LabelNotAvailable exception is thrown.
- Return type:
- Returns:
The data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged, except that for the given dimension the labels change. The old labels can not be referred to any longer. The number of labels remains the same.
See also
openeo.org documentation on process “rename_labels”.
- resample_cube_spatial(target, method=<object object>)[source]¶
Resample the spatial dimensions to match a target data cube
- Parameters:
self – A data cube.
target – A data cube that describes the spatial target resolution.
method – Resampling method to use. The following options are available and are meant to align with [gdalwarp](https://gdal.org/programs/gdalwarp.html#cmdoption-gdalwarp-r): * average: average (mean) resampling, computes the weighted average of all valid pixels * bilinear: bilinear resampling * cubic: cubic resampling * cubicspline: cubic spline resampling * lanczos: Lanczos windowed sinc resampling * max: maximum resampling, selects the maximum value from all valid pixels * med: median resampling, selects the median value of all valid pixels * min: minimum resampling, selects the minimum value from all valid pixels * mode: mode resampling, selects the value which appears most often of all the sampled points * near: nearest neighbour resampling (default) * q1: first quartile resampling, selects the first quartile value of all valid pixels * q3: third quartile resampling, selects the third quartile value of all valid pixels * rms root mean square (quadratic mean) of all valid pixels * sum: compute the weighted sum of all valid pixels Valid pixels are determined based on the function
is_valid()
.
- Return type:
- Returns:
A data cube with the same dimensions. The dimension properties (name, type, labels, reference system and resolution) remain unchanged, except for the resolution and dimension labels of the spatial dimensions.
See also
openeo.org documentation on process “resample_cube_spatial”.
- resample_cube_temporal(target, dimension=<object object>, valid_within=<object object>)[source]¶
Resample temporal dimensions to match a target data cube
- Parameters:
self – A data cube with one or more temporal dimensions.
target – A data cube that describes the temporal target resolution.
dimension – The name of the temporal dimension to resample, which must exist with this name in both data cubes. If the dimension is not set or is set to null, the process resamples all temporal dimensions that exist with the same names in both data cubes. The following exceptions may occur: * A dimension is given, but it does not exist in any of the data cubes: DimensionNotAvailable * A dimension is given, but one of them is not temporal: DimensionMismatch * No specific dimension name is given and there are no temporal dimensions with the same name in the data: DimensionMismatch
valid_within – Setting this parameter to a numerical value enables that the process searches for valid values within the given period of days before and after the target timestamps. Valid values are determined based on the function
is_valid()
. For example, the limit of 7 for the target timestamps 2020-01-15 12:00:00 looks for a nearest neighbor after 2020-01-08 12:00:00 and before 2020-01-22 12:00:00. If no valid value is found within the given period, the value will be set to no- data (null).
- Return type:
- Returns:
A raster data cube with the same dimensions and the same dimension properties (name, type, labels, reference system and resolution) for all non-temporal dimensions. For the temporal dimension, the name and type remain unchanged, but the dimension labels, resolution and reference system may change.
See also
openeo.org documentation on process “resample_cube_temporal”.
- resample_spatial(resolution=<object object>, projection=<object object>, method=<object object>, align=<object object>)[source]¶
Resample and warp the spatial dimensions
- Parameters:
self – A raster data cube.
resolution – Resamples the data cube to the target resolution, which can be specified either as separate values for x and y or as a single value for both axes. Specified in the units of the target projection. Doesn’t change the resolution by default (0).
projection – Warps the data cube to the target projection, specified as as [EPSG code](http://www.epsg-registry.org/), [WKT2 (ISO 19162) string](http://docs.opengeospatial.org/is/18-010r7/18-010r7.html), [PROJ definition (deprecated)](https://proj.org/usage/quickstart.html). By default (null), the projection is not changed.
method – Resampling method to use. The following options are available and are meant to align with [gdalwarp](https://gdal.org/programs/gdalwarp.html#cmdoption-gdalwarp-r): * average: average (mean) resampling, computes the weighted average of all valid pixels * bilinear: bilinear resampling * cubic: cubic resampling * cubicspline: cubic spline resampling * lanczos: Lanczos windowed sinc resampling * max: maximum resampling, selects the maximum value from all valid pixels * med: median resampling, selects the median value of all valid pixels * min: minimum resampling, selects the minimum value from all valid pixels * mode: mode resampling, selects the value which appears most often of all the sampled points * near: nearest neighbour resampling (default) * q1: first quartile resampling, selects the first quartile value of all valid pixels * q3: third quartile resampling, selects the third quartile value of all valid pixels * rms root mean square (quadratic mean) of all valid pixels * sum: compute the weighted sum of all valid pixels Valid pixels are determined based on the function
is_valid()
.align – Specifies to which corner of the spatial extent the new resampled data is aligned to.
- Return type:
- Returns:
A raster data cube with values warped onto the new projection. It has the same dimensions and the same dimension properties (name, type, labels, reference system and resolution) for all non-spatial or vertical spatial dimensions. For the horizontal spatial dimensions the name and type remain unchanged, but reference system, labels and resolution may change depending on the given parameters.
See also
openeo.org documentation on process “resample_spatial”.
- round(p=<object object>)[source]¶
Round to a specified precision
- Parameters:
self – A number to round.
p – A positive number specifies the number of digits after the decimal point to round to. A negative number means rounding to a power of ten, so for example -2 rounds to the nearest hundred. Defaults to 0.
- Return type:
- Returns:
The rounded number.
See also
openeo.org documentation on process “round”.
- run_udf(udf, runtime, version=<object object>, context=<object object>)[source]¶
Run a UDF
- Parameters:
self – The data to be passed to the UDF.
udf – Either source code, an absolute URL or a path to a UDF script.
runtime – A UDF runtime identifier available at the back-end.
version – An UDF runtime version. If set to null, the default runtime version specified for each runtime is used.
context – Additional data such as configuration options to be passed to the UDF.
- Return type:
- Returns:
The data processed by the UDF. The returned value can be of any data type and is exactly what the UDF code returns.
See also
openeo.org documentation on process “run_udf”.
- run_udf_externally(url, context=<object object>)[source]¶
Run an externally hosted UDF container
- Parameters:
self – The data to be passed to the UDF.
url – Absolute URL to a remote UDF service.
context – Additional data such as configuration options to be passed to the UDF.
- Return type:
- Returns:
The data processed by the UDF. The returned value can in principle be of any data type, but it depends on what is returned by the UDF code. Please see the implemented UDF interface for details.
See also
openeo.org documentation on process “run_udf_externally”.
- sar_backscatter(coefficient=<object object>, elevation_model=<object object>, mask=<object object>, contributing_area=<object object>, local_incidence_angle=<object object>, ellipsoid_incidence_angle=<object object>, noise_removal=<object object>, options=<object object>)[source]¶
Computes backscatter from SAR input
- Parameters:
self – The source data cube containing SAR input.
coefficient – Select the radiometric correction coefficient. The following options are available: * beta0: radar brightness * sigma0-ellipsoid: ground area computed with ellipsoid earth model * sigma0-terrain: ground area computed with terrain earth model * gamma0-ellipsoid: ground area computed with ellipsoid earth model in sensor line of sight * gamma0-terrain: ground area computed with terrain earth model in sensor line of sight (default) * null: non-normalized backscatter
elevation_model – The digital elevation model to use. Set to null (the default) to allow the back-end to choose, which will improve portability, but reduce reproducibility.
mask – If set to true, a data mask is added to the bands with the name mask. It indicates which values are valid (1), invalid (0) or contain no-data (null).
contributing_area – If set to true, a DEM-based local contributing area band named contributing_area is added. The values are given in square meters.
local_incidence_angle – If set to true, a DEM-based local incidence angle band named local_incidence_angle is added. The values are given in degrees.
ellipsoid_incidence_angle – If set to true, an ellipsoidal incidence angle band named ellipsoid_incidence_angle is added. The values are given in degrees.
noise_removal – If set to false, no noise removal is applied. Defaults to true, which removes noise.
options – Proprietary options for the backscatter computations. Specifying proprietary options will reduce portability.
- Return type:
- Returns:
Backscatter values corresponding to the chosen parametrization. The values are given in linear scale.
See also
openeo.org documentation on process “sar_backscatter”.
- save_ml_model(options=<object object>)[source]¶
Save a ML model
- Parameters:
self – The data to store as a machine learning model.
options – Additional parameters to create the file(s).
- Return type:
- Returns:
Returns false if the process failed to store the model, true otherwise.
See also
openeo.org documentation on process “save_ml_model”.
- save_result(format, options=<object object>)[source]¶
Save processed data
- Parameters:
self – The data to deliver in the given file format.
format – The file format to use. It must be one of the values that the server reports as supported output file formats, which usually correspond to the short GDAL/OGR codes. If the format is not suitable for storing the underlying data structure, a FormatUnsuitable exception will be thrown. This parameter is case insensitive.
options – The file format parameters to be used to create the file(s). Must correspond to the parameters that the server reports as supported parameters for the chosen format. The parameter names and valid values usually correspond to the GDAL/OGR format options.
- Return type:
- Returns:
Returns false if the process failed to make the data available, true otherwise.
See also
openeo.org documentation on process “save_result”.
- sd(ignore_nodata=<object object>)[source]¶
Standard deviation
- Parameters:
self – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if any value is such a value.
- Return type:
- Returns:
The computed sample standard deviation.
See also
openeo.org documentation on process “sd”.
- sgn()[source]¶
Signum
- Parameters:
self – A number.
- Return type:
- Returns:
The computed signum value of x.
See also
openeo.org documentation on process “sgn”.
- sin()[source]¶
Sine
- Parameters:
self – An angle in radians.
- Return type:
- Returns:
The computed sine of x.
See also
openeo.org documentation on process “sin”.
- sinh()[source]¶
Hyperbolic sine
- Parameters:
self – An angle in radians.
- Return type:
- Returns:
The computed hyperbolic sine of x.
See also
openeo.org documentation on process “sinh”.
- sort(asc=<object object>, nodata=<object object>)[source]¶
Sort data
- Parameters:
self – An array with data to sort.
asc – The default sort order is ascending, with smallest values first. To sort in reverse (descending) order, set this parameter to false.
nodata – Controls the handling of no-data values (null). By default, they are removed. If set to true, missing values in the data are put last; if set to false, they are put first.
- Return type:
- Returns:
The sorted array.
See also
openeo.org documentation on process “sort”.
- sqrt()[source]¶
Square root
- Parameters:
self – A number.
- Return type:
- Returns:
The computed square root.
See also
openeo.org documentation on process “sqrt”.
- subtract(y)[source]¶
Subtraction of two numbers
- Parameters:
self – The minuend.
y – The subtrahend.
- Return type:
- Returns:
The computed result.
See also
openeo.org documentation on process “subtract”.
- sum(ignore_nodata=<object object>)[source]¶
Compute the sum by adding up numbers
- Parameters:
self – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if any value is such a value.
- Return type:
- Returns:
The computed sum of the sequence of numbers.
See also
openeo.org documentation on process “sum”.
- tan()[source]¶
Tangent
- Parameters:
self – An angle in radians.
- Return type:
- Returns:
The computed tangent of x.
See also
openeo.org documentation on process “tan”.
- tanh()[source]¶
Hyperbolic tangent
- Parameters:
self – An angle in radians.
- Return type:
- Returns:
The computed hyperbolic tangent of x.
See also
openeo.org documentation on process “tanh”.
- text_begins(pattern, case_sensitive=<object object>)[source]¶
Text begins with another text
- Parameters:
self – Text in which to find something at the beginning.
pattern – Text to find at the beginning of data. Regular expressions are not supported.
case_sensitive – Case sensitive comparison can be disabled by setting this parameter to false.
- Return type:
- Returns:
true if data begins with pattern, false` otherwise.
See also
openeo.org documentation on process “text_begins”.
- text_concat(separator=<object object>)[source]¶
Concatenate elements to a single text
- Parameters:
self – A set of elements. Numbers, boolean values and null values get converted to their (lower case) string representation. For example: 1 (integer), -1.5 (number), true / false (boolean values)
separator – A separator to put between each of the individual texts. Defaults to an empty string.
- Return type:
- Returns:
A string containing a string representation of all the array elements in the same order, with the separator between each element.
See also
openeo.org documentation on process “text_concat”.
- text_contains(pattern, case_sensitive=<object object>)[source]¶
Text contains another text
- Parameters:
self – Text in which to find something in.
pattern – Text to find in data. Regular expressions are not supported.
case_sensitive – Case sensitive comparison can be disabled by setting this parameter to false.
- Return type:
- Returns:
true if data contains the pattern, false` otherwise.
See also
openeo.org documentation on process “text_contains”.
- text_ends(pattern, case_sensitive=<object object>)[source]¶
Text ends with another text
- Parameters:
self – Text in which to find something at the end.
pattern – Text to find at the end of data. Regular expressions are not supported.
case_sensitive – Case sensitive comparison can be disabled by setting this parameter to false.
- Return type:
- Returns:
true if data ends with pattern, false` otherwise.
See also
openeo.org documentation on process “text_ends”.
- trim_cube()[source]¶
Remove dimension labels with no-data values
- Parameters:
self – A raster data cube to trim.
- Return type:
- Returns:
A trimmed raster data cube with the same dimensions. The dimension properties name, type, reference system and resolution remain unchanged. The number of dimension labels may decrease.
See also
openeo.org documentation on process “trim_cube”.
- unflatten_dimension(dimension, target_dimensions, label_separator=<object object>)[source]¶
Split a single dimensions into multiple dimensions
- Parameters:
self – A data cube that is consistently structured so that operation can execute flawlessly (e.g. the dimension labels need to contain the label_separator exactly 1 time for two target dimensions, 2 times for three target dimensions etc.).
dimension – The name of the dimension to split.
target_dimensions – The names of the new target dimensions. New dimensions will be created with the given names and type other (see
add_dimension()
). Fails with a TargetDimensionExists exception if any of the dimensions exists. The order of the array defines the order in which the dimensions and dimension labels are added to the data cube (see the example in the process description).label_separator – The string that will be used as a separator to split the dimension labels.
- Return type:
- Returns:
A data cube with the new shape. The dimension properties (name, type, labels, reference system and resolution) for all other dimensions remain unchanged.
See also
openeo.org documentation on process “unflatten_dimension”.
- variance(ignore_nodata=<object object>)[source]¶
Variance
- Parameters:
self – An array of numbers.
ignore_nodata – Indicates whether no-data values are ignored or not. Ignores them by default. Setting this flag to false considers no-data values so that null is returned if any value is such a value.
- Return type:
- Returns:
The computed sample variance.
See also
openeo.org documentation on process “variance”.
- vector_buffer(distance)[source]¶
Buffer geometries by distance
- Parameters:
self – Geometries to apply the buffer on. Vector properties are preserved for vector data cubes and all GeoJSON Features. To maximize interoperability, a nested GeometryCollection should be avoided. Furthermore, a GeometryCollection composed of a single type of geometries should be avoided in favour of the corresponding multi-part type (e.g. MultiPolygon).
distance – The distance of the buffer in the unit of the spatial reference system. A positive distance expands the geometries and results in outward buffering (dilation) while a negative distance shrinks the geometries and results in inward buffering (erosion).
- Return type:
- Returns:
Returns a vector data cube with the computed new geometries.
See also
openeo.org documentation on process “vector_buffer”.
- vector_to_random_points(geometry_count=<object object>, total_count=<object object>, group=<object object>, seed=<object object>)[source]¶
Sample random points from geometries
- Parameters:
self – Input geometries for sample extraction. To maximize interoperability, a nested GeometryCollection should be avoided. Furthermore, a GeometryCollection composed of a single type of geometries should be avoided in favour of the corresponding multi-part type (e.g. MultiPolygon).
geometry_count – The maximum number of points to compute per geometry. Points in the input geometries can be selected only once by the sampling.
total_count – The maximum number of points to compute overall. Throws a CountMismatch exception if the specified value is less than the provided number of geometries.
group – Specifies whether the sampled points should be grouped by input geometry (default) or be generated as independent points. * If the sampled points are grouped, the process generates a MultiPoint per geometry given which keeps the original identifier if present. * Otherwise, each sampled point is generated as a distinct Point geometry without identifier.
seed – A randomization seed to use for random sampling. If not given or null, no seed is used and results may differ on subsequent use.
- Return type:
- Returns:
Returns a vector data cube with the sampled points.
See also
openeo.org documentation on process “vector_to_random_points”.
- vector_to_regular_points(distance, group=<object object>)[source]¶
Sample regular points from geometries
- Parameters:
self – Input geometries for sample extraction. To maximize interoperability, a nested GeometryCollection should be avoided. Furthermore, a GeometryCollection composed of a single type of geometries should be avoided in favour of the corresponding multi-part type (e.g. MultiPolygon).
distance – Defines the minimum distance in the unit of the reference system that is required between two samples generated inside a single geometry. - For polygons, the distance defines the cell sizes of a regular grid that starts at the upper-left bound of each polygon. The centroid of each cell is then a sample point. If the centroid is not enclosed in the polygon, no point is sampled. If no point can be sampled for the geometry at all, the first coordinate of the geometry is returned as point. - For lines (line strings), the sampling starts with a point at the first coordinate of the line and then walks along the line and samples a new point each time the distance to the previous point has been reached again. - For points, the point is returned as given.
group – Specifies whether the sampled points should be grouped by input geometry (default) or be generated as independent points. * If the sampled points are grouped, the process generates a MultiPoint per geometry given which keeps the original identifier if present. * Otherwise, each sampled point is generated as a distinct Point geometry without identifier.
- Return type:
- Returns:
Returns a vector data cube with the sampled points.
See also
openeo.org documentation on process “vector_to_regular_points”.
- xor(y)[source]¶
Logical XOR (exclusive or)
- Parameters:
self – A boolean value.
y – A boolean value.
- Return type:
- Returns:
Boolean result of the logical XOR.
See also
openeo.org documentation on process “xor”.