Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
4090853
first version of polar grid
forrestfwilliams Jul 2, 2025
6e77b33
add first pybind
forrestfwilliams Jul 2, 2025
b793d55
successfully bound with pybind
forrestfwilliams Jul 2, 2025
72653a8
add base class
forrestfwilliams Jul 3, 2025
385a972
dont try to combine rzd an pfa approaches for now
forrestfwilliams Jul 4, 2025
7b0f7e6
set up templating
forrestfwilliams Jul 7, 2025
d4737b0
small update
forrestfwilliams Jul 7, 2025
64700b3
working on geo2rdr
forrestfwilliams Jul 8, 2025
143d85a
remove unused code
forrestfwilliams Jul 8, 2025
c277125
further genericize interface
forrestfwilliams Jul 8, 2025
ff547e0
working on interp support
forrestfwilliams Jul 8, 2025
217cedc
genericize _baseband
forrestfwilliams Jul 8, 2025
e20ff6f
fix bug in indexing
forrestfwilliams Jul 8, 2025
09e0751
genericize _interpolate
forrestfwilliams Jul 8, 2025
600684b
genericize indexing rtc calls
forrestfwilliams Jul 8, 2025
0ffcb87
fix bug
forrestfwilliams Jul 8, 2025
243d398
fix indexing bug
forrestfwilliams Jul 8, 2025
1320d81
preserve differences in start positions
forrestfwilliams Jul 8, 2025
59d26d7
genericize vars
forrestfwilliams Jul 8, 2025
550c697
standardize _geo2rdrWrapper
forrestfwilliams Jul 8, 2025
378ae1d
move env out of repository
forrestfwilliams Jul 9, 2025
38e97a4
create a wrapper for rdr2geo
forrestfwilliams Jul 9, 2025
0b687e0
template RTC
forrestfwilliams Jul 9, 2025
f0ac628
template bounding box
forrestfwilliams Jul 9, 2025
8a9100d
fix bug in templated bindings
forrestfwilliams Jul 9, 2025
5292560
simplify indexing
forrestfwilliams Jul 10, 2025
e55fc74
prep for pfa integration
forrestfwilliams Jul 10, 2025
cb8a0ef
get geo2rdr up and running
forrestfwilliams Jul 10, 2025
4edf554
add new methods
forrestfwilliams Jul 10, 2025
aa9f085
update interfaces
forrestfwilliams Jul 13, 2025
3b0b760
add wrapper for rdr2geo
forrestfwilliams Jul 13, 2025
cd401e3
update bounding box
forrestfwilliams Jul 14, 2025
62a6ad7
add rtc polar templates
forrestfwilliams Jul 14, 2025
cbe6766
add start parameters
forrestfwilliams Jul 16, 2025
3b4cb71
update polar grid
forrestfwilliams Jul 16, 2025
9a902b4
add contains method
forrestfwilliams Jul 16, 2025
9225a99
first geocode template
forrestfwilliams Jul 16, 2025
ee2a617
working on pybind
forrestfwilliams Jul 16, 2025
3324443
expose polar geocode
forrestfwilliams Jul 16, 2025
c27f43e
first working version
forrestfwilliams Jul 16, 2025
16eb14c
fix geo2rdr bug
forrestfwilliams Jul 19, 2025
2287014
move geo2rdrGrid to geometry
forrestfwilliams Jul 21, 2025
d153ca3
refactor to template Topo class
forrestfwilliams Jul 22, 2025
de1c92f
start topo refactor
forrestfwilliams Jul 23, 2025
5f58fae
update for layover calculation
forrestfwilliams Jul 24, 2025
160c904
running but incorrect layover
forrestfwilliams Jul 24, 2025
47ede83
minor improvements
forrestfwilliams Jul 24, 2025
4c2699e
update bbox capability
forrestfwilliams Jul 25, 2025
48c897a
transformation improvements
forrestfwilliams Jul 25, 2025
e5ed139
refactor bounding box
forrestfwilliams Jul 27, 2025
6c32112
change newline
forrestfwilliams Jul 27, 2025
e2b0f7f
small refactor
forrestfwilliams Jul 27, 2025
514124b
fix orbit issue
forrestfwilliams Aug 4, 2025
724afe3
fix intermediate file generation
forrestfwilliams Aug 5, 2025
3ce741c
make timing fix
forrestfwilliams Aug 5, 2025
5af1514
quick commit
forrestfwilliams Aug 6, 2025
a0b3e4a
first full protoype
forrestfwilliams Aug 6, 2025
f2f0c34
fix mixing declaration
forrestfwilliams Aug 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cxx/isce3/Headers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ product/Metadata.h
product/ProcessingInformation.h
product/RadarGridProduct.h
product/GeoGridProduct.h
product/RngAzmGridParameters.h
product/RadarGridParameters.h
product/PolarGridParameters.h
product/Serialization.h
product/SubSwaths.h
product/Swath.h
Expand Down
2 changes: 2 additions & 0 deletions cxx/isce3/Sources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ math/polyfunc.cpp
math/RootFind1dNewton.cpp
math/RootFind1dSecant.cpp
polsar/symmetrize.cpp
product/RngAzmGridParameters.cpp
product/PolarGridParameters.cpp
product/RadarGridParameters.cpp
product/GeoGridParameters.cpp
product/RadarGridProduct.cpp
Expand Down
257 changes: 106 additions & 151 deletions cxx/isce3/geocode/GeocodeCov.cpp

Large diffs are not rendered by default.

35 changes: 22 additions & 13 deletions cxx/isce3/geocode/GeocodeCov.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
// isce3::product
#include <isce3/product/RadarGridProduct.h>
#include <isce3/product/RadarGridParameters.h>
#include <isce3/product/PolarGridParameters.h>

// isce3::geometry
#include <isce3/geometry/RTC.h>
Expand All @@ -32,8 +33,17 @@ enum geocodeOutputMode {
AREA_PROJECTION = 1,
};

/** Wrapper function to simplify calling geo2rdr with different grid types */
static int _geo2rdrGrid(const Vec3&, const Ellipsoid&, const Orbit&, const LUT2d<double>&,
double&, double&, const isce3::product::RadarGridParameters&,
double, int, double, bool);

template<class T>
/** Wrapper function to simplify calling geo2rdr with different grid types */
static int _geo2rdrGrid(const Vec3&, const Ellipsoid&, const Orbit&, const LUT2d<double>&,
double&, double&, const isce3::product::PolarGridParameters&,
double, int, double, bool);

template<class T, class T_grid = isce3::product::RadarGridParameters>
class Geocode {
public:
/** Geocode data from slant-range to map coordinates
Expand Down Expand Up @@ -145,7 +155,7 @@ class Geocode {
* @param[in] max_block_size Maximum block size (per thread)
* @param[in] dem_interp_method DEM interpolation method
*/
void geocode(const isce3::product::RadarGridParameters& radar_grid,
void geocode(const T_grid& radar_grid,
isce3::io::Raster& input_raster, isce3::io::Raster& output_raster,
isce3::io::Raster& dem_raster,
geocodeOutputMode output_mode = geocodeOutputMode::INTERP,
Expand Down Expand Up @@ -286,7 +296,7 @@ class Geocode {
* @param[in] dem_interp_method DEM interpolation method
*/
template<class T_out>
void geocodeInterp(const isce3::product::RadarGridParameters& radar_grid,
void geocodeInterp(const T_grid& radar_grid,
isce3::io::Raster& input_raster, isce3::io::Raster& output_raster,
isce3::io::Raster& dem_raster, bool flag_apply_rtc = false,
bool flag_az_baseband_doppler = false, bool flatten = false,
Expand Down Expand Up @@ -429,7 +439,7 @@ class Geocode {
*/
template<class T_out>
void geocodeAreaProj(
const isce3::product::RadarGridParameters& radar_grid,
const T_grid& radar_grid,
isce3::io::Raster& input_raster, isce3::io::Raster& output_raster,
isce3::io::Raster& dem_raster,
double geogrid_upsampling = 1,
Expand Down Expand Up @@ -494,8 +504,7 @@ class Geocode {
* @param[in] radar_grid Radar grid
* @param[in] dem_raster Input DEM raster
*/
void updateGeoGrid(const isce3::product::RadarGridParameters& radar_grid,
isce3::io::Raster& dem_raster);
void updateGeoGrid(const T_grid& radar_grid, isce3::io::Raster& dem_raster);

// Get/set data interpolator
isce3::core::dataInterpMethod dataInterpolator() const
Expand Down Expand Up @@ -555,7 +564,7 @@ class Geocode {
the Geocode object geogrid attributes.
*/
void _getRadarGridBoundaries(
const isce3::product::RadarGridParameters& radar_grid,
const T_grid& radar_grid,
isce3::io::Raster& input_raster, isce3::io::Raster& dem_raster,
isce3::core::ProjectionBase* proj, double geogrid_upsampling,
bool flag_upsample_radar_grid,
Expand All @@ -572,7 +581,7 @@ class Geocode {
const int k_end, double geogrid_upsampling, double* a11,
double* r11, double* y_min, double* x_min, double* y_max,
double* x_max,
const isce3::product::RadarGridParameters& radar_grid,
const T_grid& radar_grid,
isce3::core::ProjectionBase* proj,
isce3::geometry::DEMInterpolator& dem_interp_block,
const std::function<Vec3(double, double,
Expand All @@ -591,7 +600,7 @@ class Geocode {
*/
bool _checkLoadEntireRslcCorners(const double y0, const double x0,
const double yf, const double xf,
const isce3::product::RadarGridParameters& radar_grid,
const T_grid& radar_grid,
isce3::core::ProjectionBase* proj,
const std::function<Vec3(double, double,
const isce3::geometry::DEMInterpolator&,
Expand All @@ -605,7 +614,7 @@ class Geocode {
void _getRadarPositionBorder(double geogrid_upsampling, const double dem_y1,
const double dem_x1, const double dem_yf, const double dem_xf,
double* a_min, double* r_min, double* a_max, double* r_max,
const isce3::product::RadarGridParameters& radar_grid,
const T_grid& radar_grid,
isce3::core::ProjectionBase* proj,
const std::function<Vec3(double, double,
const isce3::geometry::DEMInterpolator&,
Expand All @@ -615,7 +624,7 @@ class Geocode {
const isce3::core::LUT2d<double>& slant_range_correction = {});

template<class T2, class T_out>
void _runBlock(const isce3::product::RadarGridParameters& radar_grid,
void _runBlock(const T_grid& radar_grid,
bool is_radar_grid_single_block,
std::vector<std::unique_ptr<isce3::core::Matrix<T2>>>& rdrData,
int block_size_y, int block_size_with_upsampling_y, int block_y,
Expand Down Expand Up @@ -652,7 +661,7 @@ class Geocode {

std::string _get_nbytes_str(long nbytes);

int _geo2rdr(const isce3::product::RadarGridParameters& radar_grid,
int _geo2rdr(const T_grid& radar_grid,
double x, double y, double& azimuthTime, double& slantRange,
isce3::geometry::DEMInterpolator& demInterp,
isce3::core::ProjectionBase* proj, float& dem_value);
Expand Down Expand Up @@ -720,7 +729,7 @@ class Geocode {
const int radarBlockLength, const int azimuthFirstLine,
const int rangeFirstPixel,
const isce3::core::Interpolator<T_out>* interp,
const isce3::product::RadarGridParameters& radarGrid,
const T_grid& radarGrid,
const bool flag_az_baseband_doppler, const bool flatten,
isce3::io::Raster* phase_screen_raster,
isce3::core::Matrix<float>& phase_screen_array,
Expand Down
Loading
Loading