isce3 0.25.0
Loading...
Searching...
No Matches
isce3::cuda::geocode::Geocode Class Reference

Class containing functions for geocoding by interpolation with CUDA. More...

#include <Geocode.h>

Public Member Functions

 Geocode (const isce3::product::GeoGridParameters &geogrid, const isce3::container::RadarGeometry &rdr_geom, const size_t lines_per_block=1000)
 Class constructor.
 
void geocodeRasters (std::vector< std::reference_wrapper< isce3::io::Raster > > &output_rasters, std::vector< std::reference_wrapper< isce3::io::Raster > > &input_rasters, const std::vector< isce3::core::dataInterpMethod > &interp_methods, const std::vector< GDALDataType > &raster_datatypes, const std::vector< double > &invalid_values, isce3::io::Raster &dem_raster, const isce3::core::LUT2d< double > &hostNativeDoppler={}, const isce3::core::LUT2d< double > &hostAzTimeCorrection={}, const isce3::core::LUT2d< double > &hostSRangeCorrection={}, const isce3::product::SubSwaths *subswaths=nullptr, const isce3::core::dataInterpMethod dem_interp_method=isce3::core::BIQUINTIC_METHOD, const double threshold=1e-8, const int maxiter=50, const double dr=10)
 Geocode rasters with a shared geogrid.
 

Detailed Description

Class containing functions for geocoding by interpolation with CUDA.

As designed, a single object can be used to geocode several rasters that share a common radar grid to a common geogrid. To allow processing on limited device memory, a geogrid is broken up into uniform blocks and geocoding is performed per block over several rasters. The logic and control of iterating over blocks and rasters is not included in this class. ISCE3 will contain a Python module to perform this.

Python-ish pseudo code for geocoding a several rasters: import isce3

instantiate obj

geocode_obj = isce3.cuda.geocode(number_of_lines_per_block, ...)

prepare input & output rasters

output_rasters = [isce3.io.Raster(x) for x in list_output_rasters] input_rasters = [isce3.io.Raster(x) for x in list_input_rasters]

iterate over blocks

for block in range(geocode_obj.number_of_blocks):

set radar grid coords for current block

geocode_obj.setBlockRdrCoordGrid(block)

iterate over rasters to geocode to current block

for output_raster, input_raster in zip(output_rasters, input_rasters): geocode_obj.geocodeRasterBlock(output_raster, input_raster)

Constructor & Destructor Documentation

◆ Geocode()

__host__ isce3::cuda::geocode::Geocode::Geocode ( const isce3::product::GeoGridParameters & geogrid,
const isce3::container::RadarGeometry & rdr_geom,
const size_t lines_per_block = 1000 )

Class constructor.

Sets values to be shared by all blocks. Also calculates number of blocks needed to completely geocode provided geogrid.

Parameters
[in]geogridGeogrid defining output product
[in]rdr_geomRadar geometry describing input rasters
[in]lines_per_blockNumber of lines to be processed per block

Member Function Documentation

◆ geocodeRasters()

void isce3::cuda::geocode::Geocode::geocodeRasters ( std::vector< std::reference_wrapper< isce3::io::Raster > > & output_rasters,
std::vector< std::reference_wrapper< isce3::io::Raster > > & input_rasters,
const std::vector< isce3::core::dataInterpMethod > & interp_methods,
const std::vector< GDALDataType > & raster_datatypes,
const std::vector< double > & invalid_values,
isce3::io::Raster & dem_raster,
const isce3::core::LUT2d< double > & hostNativeDoppler = {},
const isce3::core::LUT2d< double > & hostAzTimeCorrection = {},
const isce3::core::LUT2d< double > & hostSRangeCorrection = {},
const isce3::product::SubSwaths * subswaths = nullptr,
const isce3::core::dataInterpMethod dem_interp_method = isce3::core::BIQUINTIC_METHOD,
const double threshold = 1e-8,
const int maxiter = 50,
const double dr = 10 )

Geocode rasters with a shared geogrid.

Block processing handled internally in function.

Parameters
[in]output_rastersGeocoded rasters
[in]input_rastersRasters to be geocoded. Needs to be same size as output_rasters.
[in]interp_methodsData interpolation method per raster
[in]raster_datatypesGDAL type of each raster represented by equivalent int. Necessary to correctly initialize templated interpolators.
[in]invalid_valuesInvalid values for each raster
[in]dem_rasterDEM used to calculate radar grid indices
[in]hostNativeDopplerDoppler centroid of data in Hz associated radar grid, as a function azimuth and range
[in]hostAzTimeCorrectiongeo2rdr azimuth additive correction, in seconds, as a function of azimuth and range
[in]hostSRangeCorrectiongeo2rdr slant range additive correction, in seconds, as a function of azimuth and range
[in]subswathssubswath mask representing valid portions of a swath
[in]dem_interp_methodDEMinterpolation method
[in]thresholdConvergence threshold for geo2rdr
[in]maxiterMaximum iterations for geo2rdr
[in]drStep size for numerical gradient for geo2rdr

The documentation for this class was generated from the following files:

Generated for ISCE3.0 by doxygen 1.13.2.