xugrid.Ugrid2d.intersect_linestring#

Ugrid2d.intersect_linestring(obj: xr.DataArray | xr.Dataset, linestring: shapely.geometry.LineString) xr.DataArray | xr.Dataset[source]#

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

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

  • linestring (shapely.geometry.lineString) –

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