vrt.create_rgb_vrt()

Create a 3-band RGB VRT from VV and VH rasters.

Usage

Source

vrt.create_rgb_vrt(
    vv_path,
    vh_path,
    output_vrt,
    *,
    decibel_scale=False,
)

The input scale can be linear or decibel.

Band assignments:

  • Linear scale: Red=VV, Green=VH, Blue=VV/VH.
  • Decibel scale: Red=VV, Green=VH, Blue=VV-VH.

Parameters

vv_path: str | Path | UPath

Path to the VV polarization raster.

vh_path: str | Path | UPath

Path to the VH polarization raster.

output_vrt: str | Path | UPath

Path where the output VRT file will be written.

decibel_scale: bool = False
Whether the input rasters are in decibel scale. Selects the band expressions and descriptions accordingly.

Raises

ValueError
If the VV and VH rasters do not share the same dimensions, CRS, and geotransform (a mismatch would silently misalign the composited bands).