API Reference#
The API Reference contains auto-generated function documentation. This kind of documentation is meant to be concise and more technically oriented. The functions are grouped into different categories. As a regular user, you will mainly use the functions in the Components and Building Blocks categories to build and execute query recipes within a specific context. The functions in the Processor category are those internally used for query processing, and mainly of interest for advanced users and developers. The Exceptions category contains the custom exception classes of semantique.
Components#
Recipe#
Dict-like container to store instructions of a query recipe. |
Mapping#
Base class for mapping configurations. |
|
Semantique specific mapping configuration. |
EO data cube#
Base class for EO data cube configurations. |
|
Opendatacube specific EO data cube configuration. |
|
EO data cube configuration for zipped GeoTIFF files. |
|
EO data cube configuration for results from STAC searches. |
Spatio-temporal extent#
Dict-like representation of a spatial extent. |
|
Dict-like representation of a temporal extent. |
Building blocks#
References#
Reference to a semantic concept. |
|
Reference to a semantic concept being an entity. |
|
Reference to a semantic concept being an event. |
|
Reference to a data layer in an EO data cube. |
|
Reference to a data layer describing appearance. |
|
Reference to a data layer describing artifacts. |
|
Reference to a data layer describing atmosphere. |
|
Reference to a data layer describing reflectance. |
|
Reference to a data layer describing topography. |
|
Reference to a another result definition. |
|
Reference to the active evaluation object itself. |
|
Reference to a collection of multiple arrays. |
Verbs#
Verbs for single arrays#
Evaluate an expression for each pixel in an array. |
|
Extract coordinate labels of a dimension as a new array. |
|
Filter the values in an array. |
|
Filter an array along the temporal dimension. |
|
Filter an array along the spatial dimension. |
|
Assign new values to the pixels in an array. |
|
Assign temporal coordinates as values to the pixels in an array. |
|
Assign spatial coordinates as values to the pixels in an array. |
|
Group the values in an array. |
|
Group an array along the temporal dimension. |
|
Group an array along the spatial dimension. |
|
Reduce the dimensionality of an array. |
|
Shift the values in an array along a dimension. |
|
Smooth the values in an array through a moving window. |
|
Trim the dimensions of an array. |
|
Delineate spatio-temporal objects in a binary array. |
|
Fill nodata values in array by interpolating valid data values. |
|
Apply a user-defined verb to the array. |
Verbs for array collections#
Create a categorical composition of multiple binary arrays. |
|
Concatenate multiple arrays along a new or existing dimension. |
|
Merge pixel values of multiple arrays into a single value per pixel. |
|
Apply the evaluate verb to each array in a collection. |
|
Apply the extract verb to each array in a collection. |
|
Apply the filter verb to each array in a collection. |
|
Apply the filter_time verb to each array in a collection. |
|
Apply the filter_space verb to each array in a collection. |
|
Apply the assign verb to each array in a collection. |
|
Apply the assign_time verb to each array in a collection. |
|
Apply the assign_space verb to each array in a collection. |
|
Apply the reduce verb to each array in a collection. |
|
Apply the shift verb to each array in a collection. |
|
Apply the smooth verb to each array in a collection. |
|
Apply the trim verb to each array in a collection. |
|
Apply the delineate verb to each array in a collection. |
|
Apply the fill verb to each array in a collection. |
|
Apply a user-defined verb to each array in a collection. |
Utility verbs#
Give a name to an array. |
Special values#
Character label of a numeric index. |
|
Finite set of values. |
|
Interval of numerical or ordinal values. |
|
Spatial geometry object. |
|
Time instant. |
|
Time interval. |
Dimensions#
Reserved dimension names#
Reserved dimension name for the temporal dimension. |
|
Reserved dimension name for the stacked spatial (X, Y) dimension. |
|
Reserved dimension name for the spatial X dimension. |
|
Reserved dimension name for the spatial Y dimension. |
Dimension components#
Component storing the year of a timestamp. |
|
Component storing the season of a timestamp. |
|
Component storing the year quarter of a timestamp. |
|
Component storing the month number of a timestamp. |
|
Component storing the week number of a timestamp. |
|
Component storing the day number of a timestamp. |
|
Component storing the day of the week of a timestamp. |
|
Component storing the day of the year of a timestamp. |
|
Component storing the hour of a timestamp. |
|
Component storing the minute of a timestamp. |
|
Component storing the second of a timestamp. |
|
Component storing the X coordinate of a coordinate tuple. |
|
Component storing the Y coordinate of a coordinate tuple. |
|
Component storing feature index of a coordinate tuple. |
Operators#
Univariate operators#
Reference to operator function not. |
|
Reference to operator function is_missing. |
|
Reference to operator function not_missing. |
|
Reference to operator function absolute. |
|
Reference to operator function exponential. |
|
Reference to operator function cube_root. |
|
Reference to operator function natural_logarithm. |
|
Reference to operator function square_root. |
|
Reference to operator function floor. |
|
Reference to operator function ceiling. |
|
Reference to operator function cosine. |
|
Reference to operator function sine. |
|
Reference to operator function tangent. |
|
Reference to operator function secant. |
|
Reference to operator function cosecant. |
|
Reference to operator function cotangent. |
|
Reference to operator function to_degrees. |
|
Reference to operator function to_radians. |
Algebraic operators#
Reference to operator function add. |
|
Reference to operator function divide. |
|
Reference to operator function multiply. |
|
Reference to operator function power. |
|
Reference to operator function subtract. |
|
Reference to operator function normalized_difference. |
Boolean operators#
Reference to operator function and. |
|
Reference to operator function or. |
|
Reference to operator function exclusive_or. |
Relational operators#
Reference to operator function equal. |
|
Reference to operator function not_equal. |
|
Reference to operator function in. |
|
Reference to operator function not_in. |
|
Reference to operator function greater. |
|
Reference to operator function greater_equal. |
|
Reference to operator function less. |
|
Reference to operator function less_equal. |
Spatial relational operators#
Reference to operator function intersects. |
Temporal relational operators#
Reference to operator function after. |
|
Reference to operator function before. |
|
Reference to operator function during. |
Reducers#
Statistical reducers#
Reference to reducer function mean. |
|
Reference to reducer function median. |
|
Reference to reducer function mode. |
|
Reference to reducer function max. |
|
Reference to reducer function min. |
|
Reference to reducer function range. |
|
Reference to reducer function n. |
|
Reference to reducer function product. |
|
Reference to reducer function standard_deviation. |
|
Reference to reducer function sum. |
|
Reference to reducer function variance. |
Boolean reducers#
Reference to reducer function all. |
|
Reference to reducer function any. |
|
Reference to reducer function none. |
Occurence reducers#
Reference to reducer function count. |
|
Reference to reducer function percentage. |
Positional reducers#
Reference to reducer function first. |
|
Reference to reducer function last. |
Processor#
Core#
Worker that takes care of processing a semantic query. |
|
Cache of retrieved data layers. |
Array objects#
Internal representation of a multi-dimensional array. |
|
Internal representation of a collection of multiple arrays. |
Special value objects#
Object to represent a set of values within the bounds of an interval. |
Operator functions#
Univariate operators#
Test if x is not true. |
|
Test if x is a missing observation. |
|
Test if x is a valid observation. |
|
Compute the absolute value of x. |
|
Compute the exponential function of x. |
|
Compute the cube root of x. |
|
Compute the natural logarithm of x. |
|
Compute the square root of x. |
|
Compute the floor of x. |
|
Compute the ceiling of x. |
|
Compute the cosine of x. |
|
Compute the sine of x. |
|
Compute the tangent of x. |
|
Compute the secant of x. |
|
Compute the cosecant of x. |
|
Compute the cotangent of x. |
|
Converts angles in radians to angles in degrees. |
|
Converts angles in degrees to angles in radians. |
Algebraic operators#
Add y to x. |
|
Divide x by y. |
|
Multiply x by y. |
|
Raise x to the yth power. |
|
Subtract y from x. |
|
Compute the normalized difference between x and y. |
Boolean operators#
Test if both x and y are true. |
|
Test if at least one of x and y are true. |
|
Test if either x or y is true but not both. |
Relational operators#
Test if x is equal to y. |
|
Test if x is not equal to y. |
|
Test if x is a member of set y. |
|
Test if x is not a member of set y. |
|
Test if x is greater than y. |
|
Test if x is greater than or equal to y. |
|
Test if x is less than y. |
|
Test if x is less than or equal to y. |
Spatial relational operators#
Test if x spatially intersects with y. |
Temporal relational operators#
Test if x comes after y. |
|
Test if x comes before y. |
|
Test if x is during interval y. |
Reducer functions#
Statistical reducers#
Calculate the mean of a set of values. |
|
Return the median value in a set. |
|
Return the most occuring value in a set. |
|
Return the maximum value in a set. |
|
Return the minimum value in a set. |
|
Return the difference between the maximum and minimum values in a set. |
|
Return the number of observations in a set. |
|
Calculate the product of a set of values. |
|
Calculate the standard deviation of a set of values. |
|
Calculate the sum of a set of values. |
|
Calculate the variance of a set of values. |
Boolean reducers#
Test if all values in a set are true. |
|
Test if at least one value in a set is true. |
|
Test if none of the values in a set are true. |
Occurence reducers#
Count the number of true values in a set. |
|
Calculate the percentage of true values in a set. |
Positional reducers#
Return the first value in a set. |
|
Return the last value in a set. |
Utils#
Parse the spatial and temporal extent into a spatio-temporal array. |
|
Parse datetime accessor arrays. |
|
Return the appropriate nodata value for an array. |
|
Test whether all elements along a given axis in an array are null. |
|
Convert all null values in an array to 0. |
|
Convert all infinite values in an array to null values. |
|
Convert datetime64 values in an array to unix time values. |
|
Convert a numpy datetime object to a different timezone. |
Value type handling#
Worker that takes care of promoting value types during an operation. |
|
Determine the value type of an object. |
|
Obtain the value labels of an object. |
|
Mapping between numpy data types and semantique value types. |
|
Type promotion manuals for all built-in operators and reducers. |
Exceptions#
Raised when an array cannot be aligned to a given shape. |
|
Raised when a retrieved array does not contain any valid values. |
|
Raised when an array has a value type which a process does not allow. |
|
Raised when an intervals upper bound is smaller than its lower bound. |
|
Raised when a query recipe contains an invalid building block. |
|
Raised when an unexisting semantic concept is referenced. |
|
Raised when an unexisting data layer is referenced. |
|
Raised when an unexisting query result is referenced. |
|
Raised when an undefined custom verb function is used. |
|
Raised when an undefined reducer function is used. |
|
Raised when an undefined operator function. |
|
Raised when an unexisting dimension is referenced. |
|
Raised when an unexisting dimension component is referenced. |
|
Raised when a referenced label is not used for any value in an array. |
|
Raised when an array has more dimensions than a process allows. |
|
Raised when an array does not contain a required dimension. |
|
Raised when arrays in a collection have differing dimensions. |
|
Raised when a reserved dimension name is being used for a new dimension. |
|
Raised when the bounds of a time interval have differing time zones. |