update_surface

HSTB.kluster.fqpr_convenience.update_surface(surface_instance, add_fqpr=None, add_lines=None, remove_fqpr=None, remove_lines=None, regrid=True, regrid_option='update', use_dask=False)

Bathygrid instances can be updated with new points from new converted multibeam data, or have points removed from old multibeam data. If you want to update the surface for changes in the multibeam data, provide the same FQPR instance as both add_fqpr and remove_fqpr, and it will be removed and then added back. If you want to regrid right after updating the data, set regrid to True, and it will regrid any new points in the grid.

fqpr = fully qualified ping record, the term for the datastore in kluster

Parameters
  • surface_instance (Union[str, BathyGrid]) – Either a path to a Bathygrid folder (will reload the surface) or a loaded Bathygrid instance

  • add_fqpr (Union[Fqpr, list, None]) – Either a list of Fqpr instances or a single Fqpr instance to add to the surface

  • add_lines (Optional[list]) – Optional, if provided will only add lines that are in this list(s). Either a list of lines (when a single fqpr instance is provided) or a list of lists of lines (when a list of fqpr instances is provided)

  • remove_fqpr (Union[Fqpr, list, str, None]) – Either a list of Fqpr instances, a list of fqpr container names or a single Fqpr instance to remove from the surface

  • remove_lines (Optional[list]) – Optional, if provided will only add lines that are in this list(s). Either a list of lines (when a single fqpr instance is provided) or a list of lists of lines (when a list of fqpr instances is provided)

  • regrid (bool) – If True, will immediately run grid() after adding the points to update the gridded data

  • regrid_option (str) – controls what parts of the grid will get re-gridded if regrid is True, one of ‘full’, ‘update’. Full mode will regrid the entire grid. Update mode will only update those tiles that have a point_count_changed=True

  • use_dask (bool) – if True, will start a dask LocalCluster instance and perform the gridding in parallel

Returns

  • BathyGrid – BathyGrid instance for the newly updated surface

  • list – old resolution list

  • list – new resolution list