semantique.processor.operators.intersects_

Contents

semantique.processor.operators.intersects_#

semantique.processor.operators.intersects_(x, y, track_types=True, **kwargs)[source]#

Test if x spatially intersects with y.

This is a specific spatial relational operator meant to be evaluated with a spatial coordinate tuple as left-hand side operand, and semantique.geometries() as right-hand side operand. It will evaluate if the spatial point with the specified coordinates spatially intersects with any of the given geometries.

Parameters:
  • x (xarray.DataArray) – Array containing the operands at the left-hand side of each expression, which should be spatial coordinate tuples.

  • y – Spatial geometries to be used as the right-hand side of each expression. May also be another array with spatial coordinate tuples. In the latter case, when evaluating the expression for a coordinate tuple in array x the second operand is the spatial bounding box of all coordinate tuples in array y.

  • track_types (bool) – Should the operator promote the value type of the output object, based on the value type of the input objects?

  • **kwargs – Ignored.

Returns:

xarray.DataArray – An array with the same shape as x containing the results of all evaluated expressions.

Note

The spatial coordinate reference systems of x and y are expected to be equal.

Note

When tracking value types, this operator uses the following type promotion manual, with the first layer of keys being the supported value types of x, the second layer of keys being the supported value types of y given the value type of x, and the corresponding value being the promoted value type of the output.

{'coords': {'coords': 'binary', 'geometry': 'binary'}}