ANSI-C program: geocode_back.c
NAME
geocode_back - resampling and interpolation using a
geocoding look-up table. For each image point defined in
coordinate system A the lookup table contains the corresponding
coordinates in the coordinate system B. geocode_back is used to resample data
from the coordinate system B into coordinate system A. As an
example, let coordinate system A be map projection coordinates
(e.g. UTM) and coordinate system B be the SAR range/Doppler
coordinates (RDC). geocode_back can be used to resample data such
as image intensity or interferometric phase from RDC (coordinate
system B) into the map coordinate system (coordinate system A).
Programs to generate the lookup tables include gc_map, gc_map_grd,
gec_map, gec_map_grd, or gc_insar.
SYNOPSIS
geocode_back <data_in> <width_in>
<lookup_table> <data_out> <width_out>
[nlines_out] [iterp_mode] [dtype] [lr_in] [lr_out]
<data_in> | (input) data file (coordinate system B)(for SUN raster: *.ras, BMP format: *.bmp) |
<width_in> | (input) width of input data file and the lookup_table |
<lookup_table> | (input) geocoding lookup table (A-->B) (dimension of output data, real valued input coordinates) |
<data_out> | output data file (coordinate system B) (for SUN raster: *.ras, BMP format: *.bmp) |
<width_out> | width of output data file (width of lookup table) |
[nlines_out] | number of lines in the output image, (enter - for default) |
[interp_mode] | interpolation mode: 0: nearest-neighbor 1: bicubic spline (default) 2: bicubic-spline, interpolate log(data) 3: bicubic-spline, interpolate sqrt(data) |
[dtype] | input and output data format 0: FLOAT (default) 1: FCOMPLEX 2: SUN raster/BMP format 3: UNSIGNED CHAR 4: SHORT |
[lr_in] | input SUN raster/BMP format file left/write flipped (default=1: not flipped, -1: flipped) |
[lr_out] | output SUN raster/BMP format file left/write flipped (default=1: not flipped, -1: flipped) |
EXAMPLES
geocode_back 19991020.mli 2456 19991020.UTM_to_SAR
19991020_map.mli 2000 - 0
Transformation (from SAR to UTM coordinates using lookup table 19991020.UTM_to_SAR) of SAR intensity image. Nearest neighbor resampling algorithm is applied.
geocode_back 19991020.mli 2456 19991020.UTM_to_SAR
19991020_map.mli 2000 - 2
Transformation (from SAR to UTM coordinates using lookup table 8560_8059.UTM_to_SAR) of complex interferogram. Spline interpolation of log(data) is applied.
DESCRIPTION
geocode_back
preforms a mapping of the input data using the coordinates stored
in the lookup-table. In the case of normal geocoding, the
lookup-table has the dimensions of the DEM segment calculated by
gc_map. The interpolated image produced by geocode_back is in the
geometry of the resampled DEM in map coordinates. Hence the image
in radar coordinates is resampled into map coordinates as
specified in the DEM parameter file associated with the
lookup-table.
The real part of the lookup-table is the range-sample and
imaginary part of the lookup table is the azimuth line number in
the radar image geometry. The radar image geometry is called
range-doppler coordinates (RDC).
Valid input/output data formats are float, fcomplex, unsigned
char, and raster file (SUN or BMP) format. Either a spline
interpolation algorithm or a nearest neighbor resampling
algorithms can be selected. In geocoding the data used in
the interpolation is regularly spaced. In the case of unsigned
char and SUN raster or BMP image format only the nearest-neighbor
resampling algorithm is available.
Raster images may flipped left/right. The required
geocoding lookup table is created using either the program
gc_map (based on a DEM in map geometry)
or gc_insar (using a height map in
SAR geometry, as obtained with SAR interferometry).
The bicubic log interpolation approach converts the input values to logarithmic scale, performs the interpolation, and converts the data back to linear scale. This approach has the advantage that no negative values are generated in the interpolation, even for very noisy data. In order to avoid problems with negative values (log not defined) the absolute value of the input values is considered.
Interpolation using the bicubic spline of the sqrt(data) evaluates the square root of the absolute data values, performs the interpolation, and converts the data back to linear scale by squaring the interpolated value. This approach also has the advantage that no negative values are generated in the interpolation. This approach may be more accurate because the square root operation effectively reduces the bandwidth of the data samples.
SEE ALSO
gc_map, gc_map_grd, gec_map,
gec_map_grd, gc_insar, geocode,
gc_map_inversion, typedef_ISP.h, typedef_DIFF.h.