Dual-pol Radar Vegetation Index (dprvi)#
- polsartools.dprvi(infolder, window_size=1, outType='tif', cog_flag=False, cog_overviews=[2, 4, 8, 16], write_flag=True, max_workers=None, block_size=(512, 512), progress_callback=None)[source]
Compute dual-pol Radar Vegetation Index (DpRVI) from C2 matrix data.
This function processes dual-polarization SAR data to generate the DpRVI, which is useful for vegetation monitoring and biomass estimation. The processing is done in parallel blocks for improved performance.
Examples
>>> # Basic usage with default parameters >>> dprvi("/path/to/c2_data")
>>> # Advanced usage with custom parameters >>> dprvi( ... infolder="/path/to/c2_data", ... window_size=3, ... outType="tif", ... cog_flag=True, ... block_size=(1024, 1024) ... )
- Parameters:
infolder (str) – Path to the input folder containing C2 matrix files.
window_size (int, default=1) – Size of the spatial averaging window. Larger windows reduce speckle noise but decrease spatial resolution.
outType ({'tif', 'bin'}, default='tif') – Output file format: - ‘tif’: GeoTIFF format with georeferencing information - ‘bin’: Raw binary format
cog_flag (bool, default=False) – If True, creates a Cloud Optimized GeoTIFF (COG) with internal tiling and overviews for efficient web access.
cog_overviews (list[int], default=[2, 4, 8, 16]) – Overview levels for COG creation. Each number represents the decimation factor for that overview level.
write_flag (bool, default=True) – If True, writes results to disk. If False, only processes data in memory.
max_workers (int | None, default=None) – Maximum number of parallel processing workers. If None, uses CPU count - 1 workers.
block_size (tuple[int, int], default=(512, 512)) – Size of processing blocks (rows, cols) for parallel computation. Larger blocks use more memory but may be more efficient.
- Returns:
Results are written to disk as either ‘dprvi.tif’ or ‘dprvi.bin’ in the input folder.
- Return type:
None
The formulation of DpRVI is as follows:
where,
\(\text{[C2]}\) is co-variance matrix, and \(\lambda_1, \lambda_2\) are the eigen values of \(\langle\mathbf{[C2]}\rangle\) matrix in descending order. Further details on DpRVI can be obtained from [[5]](#5)