GAMMA DIFF/GEO Software: Reference Manual

Terrain Geocoding with pixel-area backscatter correction (mk_geo_radcal)

Perl scripts: mk_geo_radcal, mk_geo_data

NAME:

mk_geo_radcal - Terrain geocoding of SAR images with lookup table refinement and resample DEM to SAR Range-Doppler Coordinates (RDC) and perform pixel area correction to derive sigma0

mk_geo_data - Terrain geocoding of data sets in SAR slant-range coordinates  

Description

This is a guide on how to use the Perl script mk_geo_radcal to terrain geocode a SAR image, generate a DEM in SAR slant-range coordinates (RDC), and perform pixel-area correction of  radar backscatter for terrain effects.  mk_geo_radcal can also perform ellipsoid geocoding of  a SAR image when no DEM is available. 

The processing of geocoding requires generating a lookup table that relates the SAR image coordinates to the DEM coordinates. A DEM in the Gamma processing paradigm consists of a text format DEM parameter file and the DEM data itself. The DEM parameter file contains information on the DEM projection. size, pixel spacing, and datum. A number projections are supported including Equiangular geographic (EQA), Universal transverse Mercator (UTM), and Polar stereographic. Often we use the SRTM DEM as input. These data are in EQA format with a height reference of the local geoid. 

The lookup table is initially generated using just the image processing parameters and the DEM information. Invariably there is some residual shift that must be corrected to take into account inaccuracies in SAR processing or timing or the DEM. This is done by a process of lookup table refinement. A simulated SAR image is generated from the the DEM that should match the actual SAR image. Offsets between the simulated and actual SAR image are measured and used to generate an offset polynomial model for the error. This polynomial model is used to adjust the lookup-table values to remove the residual geolocation error. In most cases only a single constant range and azimuth offset is requied for accurate geocoding The mk_geo_radcal script takes you through these different steps. Programs in the DIFF/GEO package are used to use the lookup table to resample the SAR image into the DEM geometry (geocode_back)  and to transform the DEM into the SAR geometry (geocode).  The pixel area correction factor is calculated in slant range coordinates using the program pixel_area.

1. Terrain geocoding with mk_geo_radcal

The arguments of mk_geo_radcal can be seen by typing mk_geo_radcal from the command line. 
$ mk_geo_radcal
*** /Users/cw/gamma_software/DIFF/scripts/mk_geo_radcal
*** Copyright 2015, Gamma Remote Sensing, v5.9 17-Apr-2015 clw ***
*** Terrain geocoding of SAR images including lookup-table refinement + resampling of the DEM to SAR Range-Doppler Coordinates (RDC) ***

usage: /Users/cw/gamma_software/DIFF/scripts/mk_geo_radcal <MLI> <MLI_par> <DEM> <DEM_par> <DEM_seg> <DEM_seg_par> <GEO_dir> <scene_id> <post> <mode> [ls_mode] [r_ovr] [gc_n_ovr] [rad_max] [rlks] [azlks] [thres] [rpos] [azpos] [roff] [azoff] [r_patch] [az_patch] [nr] [naz]

    MLI          (input) MLI SAR image (including path)
    MLI_par      (input) ISP image parameter file of the MLI image (including path)
    DEM          (input) DEM in desired output projection (including path)
    DEM_par      (input) DEM parameter file (including path)
    DEM_seg      (output) DEM segment for output image products (including path)
    DEM_seg_par  (input/output) DEM parameter file for output image products (including path), regenerated each time
    GEO_dir      directory for output images, lookup tables and DEM products
    scene_id     scene name to identify output files
    post         output image sample spacing in meters or degrees for geographic (EQA) projection
    mode         processing mode:   
                   0: generate initial lookup table, simulated SAR image, and DEM segment parameters, erase existing DEM segment parameters
                   1: measure initial offset between simulated SAR image and actual SAR image
                   2: perform refinement of lookup table by offset measurement with respect to the simulated SAR image
                   3: update lookup table and produce terrain geocoded SAR image and DEM in SAR range-Doppler coordinates (RDC)
                   4: ellipsoid geocoding of the SAR image without a DEM, erase existing DEM segment parameters 
    ls_mode      algorithm selection in gc_map for regions of layover, shadow, or DEM gaps (enter - for default):
                   0: set to (0.,0.)
                   1: linear interpolation across these regions
                   2: use actual value (default)
                   3: nearest neighbour thinned (nn-thinned)
    r_ovr        range over-sampling parameter for ls_mode = 3 (nn-thinned) (enter - for default: 16)
    gc_n_ovr     interpolation oversampling factor used by geocode (enter - for default: 2)
    rad_max      maximum interpolation search radius used by geocode (enter - for default: 4*gc_n_ovr)
   
    NOTE: gc_n_ovr and rad_max are parameters used by the program geocode for transformation of the simulated image
          and DEM into SAR geometry. The parameters rlks, azlks, thres, rpos, azpos, roff, azoff are used 
      for estimation of the initial offset of the SAR image with respected to the simulated SAR image.
                  
    rlks         number of range looks for the initial offset estimate (default: 1)
    azlks        number of azimuth looks for the initial offset estimate (default: 1)
    thres        SNR threshold for offset measurements over offset grid (default: 10)
    rpos         range position for initial offset (enter - for default)
    azpos        azimuth position for initial offset (enter - for default)
    roff         initial range offset estimate (enter - for current value in DIFF_par file)
    azoff        initial azimuth offset estimate (enter - for current value in DIFF_par file)
    r_patch      range patch size for offset estimation (default: 512 samples)
    az_patch     azimuth patch size for offset estimation (default: 512 lines)
    nr           number of range patches for offset estimation (default: 0)
    naz          number of azimuth patches for offset estimation (default: 0)
    -s scale     (option) set image display scale factor (default: 0.9)  
    -e exp       (option) set image display exponent (default: 0.4)
    -b           (option) set raster image type to Sun raster format (default: bmp)
    -r           (option) use existing DEM segment to determine image bounds, do not erase an existing DEM segment parameter file
    -q           (option) quiet mode, run without displaying images on screen
    -p           (option) use pixel_area program to generate simulated SAR image in Range-Doppler Coordinates (RDC)
                          NOTE:  ls_mode must equal actual area: 2
    -j           (option) do not use layover-shadow map in pixel_area calculation
    -i map_pwr   (option) intensity image in map coordinates to be used for lookup table refinement
                          instead of a simulated SAR image, same geometry as DEM_seg
    -c           (option) calculate radiometrically calibrated radar backscatter image
    -d           (option) resample DEM to Range-Doppler Coordinates (RDC)
    -x psize     (option) image patch size for initial offset estimate using cross-correlation in mode 1 (default: 1024)
    -h           (option) reference height for ellipsoid geocoding, mode 4 (default: 100)
    -t thres2    (option) SNR threshold for initial offset estimate (default: 8)
    -n npoly     (option) number of terms in the range and azimuth offset polynomials (default: 1)
    -o n_ovr     (option) offset estimation oversampling factor for image data (default: 2)

This is not nearly as daunting as it seems. mk_geo_radcal  is run in a series of processing steps specified by the mode command line parameter.  Each step is a significant step in the geocoding process and lets you check intermediate results to see if a step has succeeded.  mk_geo_radcal generates log files of its actions in the GEO_dir that can be read with any text editor. All script commands and the screen output from running  programs are captured in the log files. There are successive log files generated for each each step in the mk_geo_radcal processing sequence with names like mk_geo_radcal_n.log. where n is the mode number.

A number of the options in mk_geo_radcal are specific options to the geocoding programs
gc_map  and  geocode.  The parameters r_ovr, n_ovr are specific to gc_map  and rad_max is used by the program  geocode.   Please consult the documentation in the DIFF/GEO package to understand what these parameters do. Nominally set ls_mode to 2 for differential SAR interferometry applications. 
 

Note that there are a number of options for running the script are specified using a dash such as -b or -s.  These options apply to all the modes. The image display factor -s takes an argument, usually less than the default 1.0 to make the displayed images dimmer to avoid saturation. Nominally -s 0.7 is used. The exponent parameter -e value is typically 0.4. To increase image contrast, increase the value of -e to 0.5.  Decreasing the exponent to 0.25 will reduce image contrast. 

The -b option forces output raster images to be in Sun raster format.  By default, display images are generated in BMP format.

The -r option tells the script to use an existing DEM_seg_par to define the region for the geocoding the scene rather than calculate the bounds of the DEM_seg_par based on the image dimensions. This is useful when geocoding several different frames or sensor images to the same output geometry. 

The -q option turns off screen display of the intermediate and final products and is required for batch processing of the images.

Very important is the -p option. If this is specified, then the pixel_area program is used to calculate the simulated SAR image in radar coordinates rather than using the geocode program to resample the simulated SAR image into radar coordinates. 

The -c option leads to the generation of radiometrically calibrated images in GeoTIFF format. A pixel area normalization factor is used to correct the radar backscatter based on the local surface geometry.  The output is given as sigma0.

The -d option causes the DEM to be resampled to Range-Doppler slant-range coordinates. This is required for differential interferometry applications, but not if radiometrically corrected images are the desired products.

The -h option is used to specify a constant height for geocoding the data or the entire scene relative to the reference ellipsoid  and is used only with mode 4. The program gec_map uses the specified value in generation of the geocoding lookup table.  The data are then geo-referenced, but not corrected for deviations from the reference height value.

The -i option enables the use of an alternate gray-scale geocoded image for geocoding refinement. This can be an image from an optical satellite such as Landsat.  This is useful when the terrain is flat and there is no information in the shaded relief image. An image can be downloaded from

The -j option turns off the use of the layover-shadow map generated by gc_map when running pixel_area with the -p option

The -o option sets the oversampling factor for geocoding refinement, recommended to be set to 4

The -t option is used to set the SNR threshold for the initial offset estimation. It may have to be adjusted lower if the area has very little topography. If the initial offset is relatively small then mode 1 can be skipped and move to mode 2 directly.

The -n option selects the number of terms in the range and azimuth polynomials used for geocoding refinement. The nominal correction is a constant offset in range and azimuth. In some cases this can be changed to include a slope or higher order. See the documentation on offset_fitm.

Note: all command-line inputs delimited with a <> are required!

Mode 0: generate initial geocoding lookup table and simulate SAR image from DEM

mk_geo_radcal mli_1_4/20080806_HH.mli mli_1_4/20080806_HH.mli.par DEM/katmai.dem DEM/katmai.dem_par geo/kt.dem geo/kt.dem_par geo kt 1.851852e-4 0 2 -s .7 -e .35 -p -c -d

The first step is to generate the initial lookup table. Modes 0 runs the gc_map program and generate the initial lookup table, and a simulated SAR image in the SAR coordinates.  In the processing example that is part of this tutorial an image pair from PALSAR has been selected acquired in 2008 over Katmai volcano in Alaska.  The images were resampled using the DEM resampled into slant-range geometry using this script.  The input DEM is in geographic lat/long (EQA) coordinates obtained from an SRTM DEM available from http://gdex.cr.usgs.gov/gdex/.   The DEM can be either 3 arc-sec (90m) of 1 arc-sec (30 m) resolution. The GeoTIFF DEM data can be converted to Gamma format using the srtm2dem script. Here is the DEM parameter file for the input DEM:

$ more katmai.dem_par
Gamma DIFF&GEO DEM/MAP parameter file
title: SRTM Katmai 3 arc-sec
DEM_projection:     EQA
data_format:        INTEGER*2
DEM_hgt_offset:          0.00000
DEM_scale:               1.00000
width:               12000
nlines:               6000
corner_lat:     60.0000000  decimal degrees
corner_lon:   -160.0000000  decimal degrees
post_lat:   -8.3333333e-04  decimal degrees
post_lon:    8.3333333e-04  decimal degrees

ellipsoid_name: WGS 84
ellipsoid_ra:        6378137.000   m
ellipsoid_reciprocal_flattening:  298.2572236

datum_name: WGS 1984
datum_shift_dx:              0.000   m
datum_shift_dy:              0.000   m
datum_shift_dz:              0.000   m
datum_scale_m:         0.00000e+00
datum_rotation_alpha:  0.00000e+00   arc-sec
datum_rotation_beta:   0.00000e+00   arc-sec
datum_rotation_gamma:  0.00000e+00   arc-sec
datum_country_list Global Definition, WGS84, World



The input DEM is in EQA geographic coordinates (lat/lon) and can be displayed using:

rasshd katmai.dem 12000 30 30 1 0 3 3 - - 1 katmai.dem.ras 1
disdem_par
katmai.dem katmai.dem_par 

The first step is generate the look up table to geocode the input image mli_1_4/20080806_HH.mli with parameter file mli_1_4/20080806_HH.mli.par  using the DEM data in DEM/katmai.dem with the parameter file geo/kt.dem_par. The program pixel_area is used to calculate the simulated radar image in slant range coordaintes kt_0.pix using the layover-shadow map, lookup table, and incidence angle map. The script then displays both the simulated radar image and the actual radar image.

mk_geo_radcal mli_1_4/20080806_HH.mli mli_1_4/20080806_HH.mli.par DEM/katmai.dem DEM/katmai.dem_par geo/kt.dem geo/kt.dem_par geo kt 1.851852e-4 0 2 -s .7 -e .35 -p -c -d

The section of the the DEM covering the SAR image is resampled to -1.8518520e-04 degrees  (~20m) and stored in the file kt.dem  with parameter file kt.dem_par.
The output products will be in the  geo directory. The following commands are executed by the script in Mode 0 to accomplish this:

#generate lookup table and simulated SAR image kt_0.sim, incidence angle map kt_0.inc_map, pixel area map kt_0.pix_map, and the layover shadow map kt_0.ls_map. The geometry of these files is defined by the dem segment parameter file kt.dem_par.

gc_map mli_1_4/20080806_HH.mli.par - DEM/katmai.dem_par DEM/katmai.dem geo/kt.dem_par geo/kt.dem geo/kt_0.map_to_rdc 4.49999962200003 4.49999962200003 geo/kt_0.sim - - geo/kt_0.inc_map - geo/kt_0.pix_map geo/kt_0.ls_map 32 2 16

The DEM segment dimensions and sample spacing is determined by gc_map and stored in the DEM segment parameter file, in this cast kt.dem_par:

Gamma DIFF&GEO DEM/MAP parameter file
title: srtm_06_01
DEM_projection:     EQA
data_format:        REAL*4
DEM_hgt_offset:          0.00000
DEM_scale:               1.00000
width:                8770
nlines:               5845
corner_lat:     58.8516667  decimal degrees
corner_lon:   -155.3466667  decimal degrees
post_lat:   -1.8518520e-04  decimal degrees
post_lon:    1.8518520e-04  decimal degrees

ellipsoid_name: WGS 84
ellipsoid_ra:        6378137.000   m
ellipsoid_reciprocal_flattening:  298.2572236

datum_name: WGS 1984
datum_shift_dx:              0.000   m
datum_shift_dy:              0.000   m
datum_shift_dz:              0.000   m
datum_scale_m:         0.00000e+00
datum_rotation_alpha:  0.00000e+00   arc-sec
datum_rotation_beta:   0.00000e+00   arc-sec
datum_rotation_gamma:  0.00000e+00   arc-sec
datum_country_list Global Definition, WGS84, World


Next calculate pixel area in slant-range coordinates using pixel_area and display the result. If the -q option has been set, then the display is bypassed

pixel_area mli_1_4/20080806_HH.mli.par geo/kt.dem_par geo/kt.dem geo/kt_0.map_to_rdc geo/kt_0.ls_map geo/kt_0.inc_map geo/kt_0.pix
raspwr geo/kt_0.pix 4968 1 0 1 1 1. .5  1 geo/kt_0.pix.ras
dis2ras geo/kt_0.pix.ras mli_1_4/20080806_HH.mli.ras&

You will see a display window pop up with the simulated image and the SAR image together. You can switch display between the images using the center mouse button.

Mode 1:  Estimate initial offset between the actual and simulated SAR images and refine the lookup table

mk_geo_radcal mli_1_4/20080806_HH.mli mli_1_4/20080806_HH.mli.par DEM/katmai.dem DEM/katmai.dem_par geo/kt.dem geo/kt.dem_par geo kt 1.851852e-4 1 2 -s .7 -e .35 -p -c -d

Residual errors in the geocoding are estimated and removed by measuring the offsets between the simulated SAR image produced from the DEM and the actual SAR image. The offset information is stored in a DIFF/GEO parameter file and created using the create_diff_par program in the DIFF/GEO package. The simulated SAR image is calculated in the map (DEM) geometry when running modes 0 or 1. by the call to gc_map.  These are arguments to the init_offsetm program. See the DIFF/GEO documentation on init_offsetm on how to set them to get a valid offset. 

    rlks    number of range looks for the initial offset estimate (default: 1)
    azlks   number of azimuth looks for the initial offset estimate (default: 1)
    thres   SNR threshold for offset estimates (default: 10)
    rpos    range position for initial offset (enter - for default)
    azpos   azimuth position for initial offset (enter - for default)
    roff    initial range offset estimate (enter - for current value in DIFF_par file)
    azoff   initial azimuth offset estimate (enter - for current value in DIFF_par file)

The commands executed by mode 1 are first to create the DIFF_par parameter file that holds the offset model for geocoding refinement, followed by init_offsetm determine the initial offset between the simulated SAR image and the actual image

#create DIFF_par parameter file to save the offset parameters:
create_diff_par mli_1_4/20080806_HH.mli.par - geo/kt.diff_par 1 < geo/kt.diff_par.in

The file kt.diff_par.in contains inputs for create_diff_par.

#measure offset for a single large patch
init_offsetm geo/kt_0.pix mli_1_4/20080806_HH.mli geo/kt.diff_par 3 3 2484 4065.5 0 0 10 1024 1

initial range offset (samples): -2.68825   azimuth offset (lines): -5.67973
setting range and azimuth offset polynomial values to initial offsets in file: geo/kt.diff_par

Mode 2: Estimate offsets between the SAR and simulated image and calculate the polynomial offset model:

$ mk_geo_radcal mli_1_4/20080806_HH.mli mli_1_4/20080806_HH.mli.par DEM/katmai.dem DEM/katmai.dem_par geo/kt.dem geo/kt.dem_par geo kt 1.851852e-4 2 2 -s .7 -e .35 -p -c -d

Note that many cases it is sufficient for getting an accurate scene geocoding only to measure this one offset and go directly to mode 3. In some images with very few features there are only a few areas in the scene that can be used for measuring the offset. In that case, do not run mode 2 of mk_geo_radcal. Enter the center of this area on the command line in the MLI pixel coordinates for mode 1 and go directly to mode 3.   Running mk_geo_radcal mode 2 will estimate the offsets over the entire scene using image patches (512x512) on a grid. The patch size can be changed using  the r_patch and az_patch parameters.  The program offset_pwrm measures the offsets over the entire scene and offset_fitm calculates the range and azimuth offset polynomials from the offset measurements and signal to noise ratio (SNR) of the measurements:

#measure offsets of intensity images
offset_pwrm geo/lan_0.sim_rdc rmli_2_10/rmli_2_10.ave geo/lan.diff geo/lan.offs geo/lan.snr

#calculate range and azimuth offset polynomials with 3 terms each
offset_fitm geo/lan.offs geo/lan.snr geo/lan.diff geo/lan.coffs - 10 3

In a few cases with sparse dem data or images with no contrast, it may not be possible to find enough points to estimate the offset polynomial parameters. In this case, select a single area in the image with some features and that are also visible in the simulated SAR image. Determine the coordinates of this point in the SAR image and then run mode 2 above specifying the coordinates with rpos and azpos command line parameters. The initial offset values are written as the constant values of offset polynomials. This should usually be sufficient to geocode the image and you can omit running Mode 2.

After this process the DIFF_GEO parameter file  is as below, note the range and azimuth offset polynomials:


$ more kt.diff_par
Gamma DIFF&GEO Processing Parameters
title: kt
initial_range_offset:                   -3
initial_azimuth_offset:                 -6
range_samp_1:                         4968
az_samp_1:                            8131
first_nonzero_range_pixel_1:             0
number_of_nonzero_range_pixels_1:     4968
range_pixel_spacing_1:            9.368514
az_pixel_spacing_1:              12.577748
range_samp_2:                         4968
az_samp_2:                            8131
first_nonzero_range_pixel_2:             0
number_of_nonzero_range_pixels_2:     4968
range_pixel_spacing_2:            9.368514
az_pixel_spacing_2:              12.577748
offset_estimation_starting_range:       48
offset_estimation_ending_range:       4920
offset_estimation_range_samples:        20
offset_estimation_range_spacing:       256
offset_estimation_starting_azimuth:     48
offset_estimation_ending_azimuth:     8083
offset_estimation_azimuth_samples:      20
offset_estimation_azimuth_spacing:     422
offset_estimation_patch_width:         512
offset_estimation_patch_height:        512
offset_estimation_threshhold:        10.00
range_offset_polynomial:         -2.41406    8.2933e-06   -7.3133e-05    0.0000e+00    0.0000e+00    0.0000e+00
azimuth_offset_polynomial:       -5.98119   -4.4024e-05    4.7028e-06    0.0000e+00    0.0000e+00    0.0000e+00
starting_azimuth_line:                   0
map_azimuth_lines:                       0
map_width:                               0
first_map_range_pixel:                   0
number_map_range_pixels:                 0
range_looks:                             0
azimuth_looks:                           0
diff_phase_fit:       0.00000    0.0000e+00    0.0000e+00    0.0000e+00    0.0000e+00    0.0000e+00



Mode 3: Update lookup table, generate terrain geocoded image, perform pixel area correction and generate GEOTIFF output. Calculate DEM in SAR range-doppler coordinates:

mk_geo_radcal mli_1_4/20080806_HH.mli mli_1_4/20080806_HH.mli.par DEM/katmai.dem DEM/katmai.dem_par geo/kt.dem geo/kt.dem_par geo kt 1.851852e-4 3 2 -s .7 -e .35 -p -c -d

The final steps in terrain geocoding are updating the lookup table, generate the terrain geocoded image from the SAR image, perform pixel area correction, and transform the DEM into SAR coordinates. The resampled DEM is used for simulation of interferograms in the production of 2-pass differential interferograms and is generated only when the -d option is selected  At each step, output image products are generated for comparison and display. Display of the images on the screen does not occur if the quiet optioin -q is set:

#update the geocoding lookup table using gc_map_fine:
gc_map_fine geo/kt_0.map_to_rdc 8770 geo/kt.diff_par geo/kt_1.map_to_rdc 1

#pixel area correction factor calculated using the refined lookup table, layover-shadow map, and incidence angle map:
pixel_area mli_1_4/20080806_HH.mli.par geo/kt.dem_par geo/kt.dem geo/kt_1.map_to_rdc geo/kt_0.ls_map geo/kt_0.inc_map geo/kt_1.pix
raspwr geo/kt_1.pix 4968 1 0 1 1 1. .5  1 geo/kt_1.pix.ras

#resample the DEM into radar range-doppler coordiantes:
geocode geo/kt_1.map_to_rdc geo/kt.dem 8770 geo/kt_dem.rdc 4968 8131 2 0 1 1 2 8
rashgt geo/kt_dem.rdc geo/kt_1.pix 4968 1 1 0 1 1 100 1. .35 1 geo/kt_dem.rdc.ras

#display the simulated SAR image and the actual SAR image:
dis2ras geo/kt_1.pix.ras mli_1_4/20080806_HH.mli.ras&

#geocode the backscatter radar image by resampling the SAR image into the map projection geometry:
geocode_back mli_1_4/20080806_HH.mli 4968 geo/kt_1.map_to_rdc geo/kt_map.mli 8770 5845 2 0
raspwr geo/kt_map.mli 8770 1 0 1 1 .7 .35 1 geo/kt_map.mli.ras

#generate ellipse corrected sigma0 image from the input radar image proportional to beta0:
radcal_MLI mli_1_4/20080806_HH.mli mli_1_4/20080806_HH.mli.par - mli_1_4/20080806_HH.mli.ellipse_cal - 0 0 1 0.0 - geo/kt.pix_ellipse

#perform ratio between pixel area ellipsoidal pixel area corection factor and the pixel area correction factor determined from the DEM:
ratio geo/kt.pix_ellipse  geo/kt_1.pix geo/kt.ratio_sigma0 4968 1 1

#multiply the radar backstatter image by this ratio:
product mli_1_4/20080806_HH.mli geo/kt.ratio_sigma0 geo/kt.pix_cal 4968 1 1

#terrain geocode the pixel-area compensated backscatter image:
geocode_back geo/kt.pix_cal 4968 geo/kt_1.map_to_rdc geo/kt_cal_map.mli 8770 5845 2 0
raspwr geo/kt_cal_map.mli 8770 1 0 1 1 .7 .35 1 geo/kt_cal_map.mli.ras

#generate geotiff output image product
data2geotiff geo/kt.dem_par geo/kt_cal_map.mli 2 geo/kt_cal_map.mli.tif
disras_dem_par geo/kt_cal_map.mli.ras geo/kt.dem_par&

2. Terrain geocoding additional data files using the mk_geo_data script

An additional script mk_geo_data exists to generate terrain geocoded images of additional data products if mk_geo_data has been completed successfully. This script extracts values from the different parameter files and generates the call to geocode_back that is used to do the resampling. the parameters are in the MLI_par and DEM_seg_par files.

$ mk_geo_data
*** /home/cw/gamma_software/DIFF/scripts/mk_geo_data
*** Copyright 2012, Gamma Remote Sensing, 1.5 17-Apr-2012 clw ***
*** Terrain geocoding of data sets in SAR slant-range coordinates ***

usage: /home/cw/gamma_software/DIFF/scripts/mk_geo_data <MLI_par> <DEM_seg_par> <gc> <data> <data_geo> <interp_mode> <format> <log>
  MLI_par      (input) MLI image parameter file with same dimensions as input data
  DEM_seg_par  (input) DEM parameter file for output geocoded product
  gc           (input) geocoding lookup table (map coordinates --> RDC), use refined lookup table if available
  data         (input) input data set with same dimensions as the MLI image
  data_geo     (output) output terrain geocoded data set
  interp_mode  interpolation mode:
                 0: nearest-neighbor
                 1: bicubic
                 2: bicubic-log
  format       input data format:
                 0: float (4 bytes/value)
                 1: fcomplex (re,im float)
                 2: SUN raster/BMP
                 3: unsigned byte
                 4: short integer (2 bytes/value)
  log          log file name

The MLI_par is used to define the dimensions of the SAR data set. This data set may be an interferometric product such as a deformation map. Also required is the lookup table that has been updated by gc_map_fine to account for geocoding location errors. The user can specify the interpolation mode and data format. Further documentation on these parameters is in the DIFF/GEO documentation of geocode_back.  For example to geocode a complex format differential interferogram in RDC into EQA

mk_geo_data mli_1_4/20080806_HH.mli.par geo/kt.dem_par geo/kt_1.map_to_rdc  diff0_orb/20080806_HH_20080921_HH.diff  diff0_orb/20080806_HH_20080921_HH_eqa.diff 1 1 mk_geo_data.log

#terrain geocode the complex differential interferogram using geocode_back:
geocode_back diff0_orb/20080806_HH_20080921_HH.diff 4968 geo/kt_1.map_to_rdc diff0_orb/20080806_HH_20080921_HH_eqa.diff 8770 5845 1 1


Copyright by Gamma Remote Sensing, 2015. CW last change 11-.