filter_subset_by_polygon

HSTB.kluster.modules.subset.filter_subset_by_polygon(ping_dataset, polygon)

Given the provided polygon coordinates, return the part of the ping dataset that is completely within the polygon and the part of the dataset that intersects with the polygon

Parameters
  • ping_dataset (Dataset) – one of the multibeam.raw_ping datasets, containing the ping variables

  • polygon (array) – coordinates of a polygon ex: np.array([[lon1, lat1], [lon2, lat2], …]), first and last coordinate must be the same

Returns

  • xr.Dataset – 1dim flattened bool mask for soundings in a geohash that is completely within the polygon

  • xr.Dataset – 1dim flattened bool mask for soundings in a geohash that intersects with the polygon