generate_new_surface¶
- HSTB.kluster.fqpr_convenience.generate_new_surface(fqpr_inst=None, grid_type='single_resolution', tile_size=1024.0, subtile_size=128.0, gridding_algorithm='mean', resolution=None, auto_resolution_mode='depth', use_dask=False, output_path=None, export_path=None, export_format='geotiff', export_z_positive_up=True, export_resolution=None, client=None, grid_parameters=None)¶
Using the bathygrid create_grid convenience function, generate a new variable/single resolution surface for the provided Kluster fqpr instance(s).
If fqpr_inst is provided and is not a list, generates a surface based on that specific fqpr converted instance.
If fqpr_inst provided is a list of fqpr instances, will concatenate these instances and build a single surface.
Returns an instance of the surface class and optionally saves the surface to disk.
- Parameters
fqpr_inst (
Union[Fqpr,list,None]) – instance or list of instances of fqpr_generation.Fqpr class that contains generated soundings data, see perform_all_processing or reload_data. Can also be a dict or list of dicts when generating a surface from point data outside of the FQPR object. These dicts should have keys including [‘x’, ‘y’, ‘z’, ‘crs’, ‘vert_ref’] and optionally [‘tvu’, ‘thu’, ‘tag’, ‘files’]. tvu and thu will be used in the CUBE algorithm, tag will be the container name tagged for these points in the bathygrid instance, and files will be logged as the source files for that container in the bathygrid metadata. If None is provided, will create an empty surface.grid_type (
str) – one of ‘single_resolution’, ‘variable_resolution_tile’tile_size (
float) – main tile size, the size in meters of the tiles within the grid, a larger tile size will improve performance, but size should be at most 1/2 the length/width of the survey areasubtile_size (
float) – sub tile size, only used for variable resolution, the size of the subtiles within the tiles, subtiles are the smallest unit within the grid that is single resolutiongridding_algorithm (
str) – algorithm to grid by, one of ‘mean’, ‘shoalest’, ‘cube’resolution (
Optional[float]) – resolution of the gridded data in the Tilesauto_resolution_mode (
str) – one of density, depth; chooses the algorithm used to determine the resolution for the grid/tileuse_dask (
bool) – if True, will start a dask LocalCluster instance and perform the gridding in paralleloutput_path (
Optional[str]) – if provided, will save the Bathygrid to this pathexport_path (
Optional[str]) – if provided, will export the Bathygrid to file using export_format and export_resolutionexport_format (
str) – format option, one of ‘csv’, ‘geotiff’, ‘bag’export_z_positive_up (
bool) – if True, will output bands with positive up conventionexport_resolution (
Optional[float]) – if provided, will only export the given resolutionclient (
Optional[Client]) – dask.distributed.Client instance, if you don’t include this, it will automatically start a LocalCluster with the default options, if you set use_dask to Truegrid_parameters (
Optional[dict]) – optional dict of settings to pass to the grid algorithm
- Returns
BathyGrid instance for the newly created surface
- Return type
BathyGrid