🔸UAVSAR — PolSARtools 0.11 documentation

Skip to main content
`Ctrl`+`K`

# 🔸UAVSAR

## GRD (`import_uavsar_grd`)

The import_uavsar_grd function extracts matrix elements (C3 or T3) from the given UAVSAR .ann file and saves them into respective directories (C3 or T3).

polsartools.import_uavsar_grd(ann, mat='C3', fmt='tif', cog=False, ovr=[2, 4, 8, 16], comp=False, out_dir=None)

  Extracts specified matrix elements (C3 or T3) from a UAVSAR GRD .ann file and saves them as georeferenced raster files in the specified format.

  ### Example:

      >>> uavsaimport_uavsar_grdr_grd("path_to_file.ann", mat='C3')
      Extracts C3 matrix elements and saves them as GeoTIFFs in the 'C3' directory.

      >>> import_uavsar_grd("path_to_file.ann", mat='T3', fmt='tif', cog=True, comp=True)
      Extracts T3 matrix elements and saves them as Cloud Optimized GeoTIFFs with compression.

  ### Parameters:

  annstr

    Path to the UAVSAR annotation file (.ann) containing metadata for the radar data.

  matstr, optional (default=’C3’)

    Type of matrix to extract. Must be either ‘C3’ or ‘T3’.

  fmtstr, optional (default=’tif’)

    Output file format. Currently supports ‘tif’ (GeoTIFF) and ‘bin’ (ENVI/PolSARpro/binary).

  cogbool, optional (default=False)

    If True, output files will be saved as Cloud Optimized GeoTIFFs (COGs) with tiling and overviews.

  ovrlist of int, optional (default=[2, 4, 8, 16])

    Overview levels to generate for COGs. Ignored if cog is False.

  compbool, optional (default=False)

    If True, applies LZW compression to reduce file size.

  out_dirstr or None, optional (default=None)

    Directory to save output files. If None, a subdirectory named after the matrix type (‘C3’ or ‘T3’) will be created.

## MLC (`import_uavsar_mlc`)

The import_uavsar_mlc function extracts matrix elements (C3 or T3) from the given UAVSAR .ann file and saves them into respective directories (C3 or T3).

polsartools.import_uavsar_mlc(ann, mat='C3', fmt='tif', cog=False, ovr=[2, 4, 8, 16], comp=False, out_dir=None)

  Extracts specified matrix elements (C3 or T3) from a UAVSAR GRD .ann file and saves them as raster files in the specified format.

  ### Example:

      >>> uavsimport_uavsar_mlcar_mlc("path_to_file.ann", mat='C3')
      Extracts C3 matrix elements and saves them as GeoTIFFs in the 'C3' directory.

      >>> import_uavsar_mlc("path_to_file.ann", mat='T3', fmt='tif', cog=True, comp=True)
      Extracts T3 matrix elements and saves them as Cloud Optimized GeoTIFFs with compression.

  ### Parameters:

  annstr

    Path to the UAVSAR annotation file (.ann) containing metadata for the radar data.

  matstr, optional (default=’C3’)

    Type of matrix to extract. Must be either ‘C3’ or ‘T3’.

  fmtstr, optional (default=’tif’)

    Output file format. Currently supports ‘tif’ (GeoTIFF) and ‘bin’ (ENVI/PolSARpro/binary).

  cogbool, optional (default=False)

    If True, output files will be saved as Cloud Optimized GeoTIFFs (COGs) with tiling and overviews.

  ovrlist of int, optional (default=[2, 4, 8, 16])

    Overview levels to generate for COGs. Ignored if cog is False.

  compbool, optional (default=False)

    If True, applies LZW compression to reduce file size.

  out_dirstr or None, optional (default=None)

    Directory to save output files. If None, a subdirectory named after the matrix type (‘C3’ or ‘T3’) will be created.