remotior_sensus.tools.band_clip module

Band clip.

This tool allows for clipping the bands of a BandSet.

Typical usage example:

>>> # import Remotior Sensus and start the session
>>> import remotior_sensus
>>> rs = remotior_sensus.Session()
>>> # box coordinate list
>>> extent_list = [230250, 4674510, 230320, 4674440]
>>> # start the process
>>> clip = rs.band_clip(input_bands=['path_1', 'path_2'],
... output_path='output_path', extent_list=extent_list)
remotior_sensus.tools.band_clip.band_clip(input_bands: list | int | BandSet, output_path: str | list | None = None, vector_path: str | None = '', vector_field: None | str = None, overwrite: bool | None = False, prefix: str | None = '', extent_list: list | None = None, n_processes: None | int = None, available_ram: None | int = None, bandset_catalog: BandSetCatalog | None = None, virtual_output: bool | None = None) OutputManager

Perform band clip.

This tool allows for clipping the bands of a BandSet based on a vector or list of boundary coordinates left top right bottom.

Parameters:
  • input_bands – input of type BandSet or list of paths or integer number of BandSet.

  • output_path – string of output path directory or list of paths.

  • overwrite – if True, output overwrites existing files.

  • vector_path – path of vector used to clip.

  • vector_field – vector field name used to clip for every unique ID.

  • virtual_output – if True (and output_path is directory), save output as virtual raster of multiprocess parts

  • prefix – optional string for output name prefix.

  • extent_list – list of boundary coordinates left top right bottom.

  • n_processes – number of parallel processes.

  • available_ram – number of megabytes of RAM available to processes.

  • bandset_catalog – optional type BandSetCatalog for BandSet number

Returns:

Object OutputManager() with
  • paths = output list

Examples

Clip using vector
>>> # start the process
>>> clip = band_clip(input_bands=['path_1', 'path_2'],
... output_path='output_path', vector_path='vector_path',
... prefix='clip_')