xugrid.Ugrid2d.intersect_line#

Ugrid2d.intersect_line(obj, start: Sequence[float], end: Sequence[float])[source]#

Intersect a line with this grid, and fetch the values of the intersected faces.

Parameters:
  • obj (xr.DataArray or xr.Dataset)

  • start (sequence of two floats) – coordinate pair (x, y), designating the start point of the line.

  • end (sequence of two floats) – coordinate pair (x, y), designating the end point of the line.

Returns:

selection – The name of the topology is prefixed in the x, y and s (spatium=distance) coordinates.

Return type:

xr.DataArray or xr.Dataset