xugrid.UgridDataArrayAccessor.intersect_linestring#

UgridDataArrayAccessor.intersect_linestring(linestring) DataArray[source]#

Intersect the grid along a collection of linestrings. Returns a new DataArray with the values for each intersected segment.

Parameters:

linestring (shapely.LineString) –

Returns:

intersection – The length along the linestring is returned as the “s” coordinate.

Return type:

xr.DataArray