polaris.tasks.mesh.spherical.unified.river.build_river_network_dataset

polaris.tasks.mesh.spherical.unified.river.build_river_network_dataset(river_feature_collection, ds_coastline, resolution, channel_subsegment_fraction=0.5, channel_buffer_km=0.0)[source]

Rasterize a simplified river network onto a regular lat-lon grid.

Parameters:
  • river_feature_collection (dict) – A GeoJSON feature collection of simplified river line segments

  • ds_coastline (xarray.Dataset) – Coastline dataset with lat and lon variables

  • resolution (float) – The target grid resolution in degrees

  • channel_subsegment_fraction (float, optional) – Fraction of the target resolution used as the maximum inter-sample spacing when densifying river channels for rasterization

  • channel_buffer_km (float, optional) – Physical buffer radius in kilometres around each sampled channel point within which additional grid cells are marked

Returns:

ds_river (xarray.Dataset) – Dataset with river_channel_mask on the target lat-lon grid