isce3 0.25.0
|
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. | |
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
geocode_obj = isce3.cuda.geocode(number_of_lines_per_block, ...)
output_rasters = [isce3.io.Raster(x) for x in list_output_rasters] input_rasters = [isce3.io.Raster(x) for x in list_input_rasters]
for block in range(geocode_obj.number_of_blocks):
geocode_obj.setBlockRdrCoordGrid(block)
for output_raster, input_raster in zip(output_rasters, input_rasters): geocode_obj.geocodeRasterBlock(output_raster, input_raster)
__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.
[in] | geogrid | Geogrid defining output product |
[in] | rdr_geom | Radar geometry describing input rasters |
[in] | lines_per_block | Number of lines to be processed per block |
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.
[in] | output_rasters | Geocoded rasters |
[in] | input_rasters | Rasters to be geocoded. Needs to be same size as output_rasters. |
[in] | interp_methods | Data interpolation method per raster |
[in] | raster_datatypes | GDAL type of each raster represented by equivalent int. Necessary to correctly initialize templated interpolators. |
[in] | invalid_values | Invalid values for each raster |
[in] | dem_raster | DEM used to calculate radar grid indices |
[in] | hostNativeDoppler | Doppler centroid of data in Hz associated radar grid, as a function azimuth and range |
[in] | hostAzTimeCorrection | geo2rdr azimuth additive correction, in seconds, as a function of azimuth and range |
[in] | hostSRangeCorrection | geo2rdr slant range additive correction, in seconds, as a function of azimuth and range |
[in] | subswaths | subswath mask representing valid portions of a swath |
[in] | dem_interp_method | DEMinterpolation method |
[in] | threshold | Convergence threshold for geo2rdr |
[in] | maxiter | Maximum iterations for geo2rdr |
[in] | dr | Step size for numerical gradient for geo2rdr |