xugrid.UgridDatasetAccessor.intersect_line#

UgridDatasetAccessor.intersect_line(start: Sequence[float], end: Sequence[float]) Dataset[source]#

Intersect a line with the grid of this data, 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:

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

Return type:

xr.Dataset