ANSI-C program: pt2d.c
NAME
pt2d - vector to raster format conversion (interpolate point data
values into a 2-D data file / uses width, height, number of looks
as input)
SYNOPSIS
pt2d <plist> <pmask> <pdata>
<rec_num> <f_out> <width> <nlines>
<grps> <azps> [rlks] [azlks] [type] [imode] radius]
[np_min]
<plist> | (input) point list (int) |
<pmask> | (input) point data stack of mask values (uchar, pmask[i]=0 excludes point i, enter - if not available) |
<pdata> | (input) point data stack (various types supported) |
<rec_num> | record number in input point data stack (starting with 1) |
<f_out> | (output) 2-D image data file (same type as input point data stack) |
<width> | number of samples/row in the output image |
<nlines> | number of lines in the output image |
<grps> | ground range pixel spacing of SLC reference (m, grps=rps/sin(inc_ang) ) |
<azps> | SLC azimuth pixel spacing (m) |
[rlks] | range looks of output image relative SLC reference (default -: 1) |
[azlks] | azimuth looks of output image relative SLC reference (default -: 1) |
[type] | data type (0:fcomplex 1:scomplex 2:float 3:int 4:short 5:byte, default -: float) |
[imode] | interpolation mode (0:none 1:3-pt_bilinear 2:6-pt_bilinear 3:convol 4:nn_convol, default -: 6-pt_bilinear) |
[radius] | window radius used (only used for imodes (3,4), default: 4.0) |
[np_min] | minimum number of points required for search region (only used for imodes (3,4), default: 3) |
EXAMPLE
pt2d testsite.plist testsite.pmask testsite.punw 4
20491_08560.unw 1000 1000 19.8 4.1 1 5 2 2
A 2-D image (float) is generated by interpolation (using 6 point bilinear interpolation method) of the point data values defined in record 4 of the point data stack of unwrapped phase values (testsite.punw). The point list testsite.plist contains the point coordinates. No point data stack of mask values is provided.
pt2d testsite.plist testsite.pmask testsite.punw 4 20491_08560.unw 1000 1000 19.8 4.1 2 4 7.5 5A 2-D image (float) is generated by interpolation (using nn_convol interpolation method with a maximum window radius of 7.5 pixel and a minimum number of 5 points) of the point data values defined in record 4 of the point data stack of unwrapped phase values (testsite.punw). The point list testsite.plist contains the point coordinates and the point data stack testsite.pmask mask values.
pt2d testsite.plist - testsite.punw 4 20491_08560.unw 1000 1000 19.8 4.1 2 0 0A 2-D image (float) is generated from the point data values defined in record 4 of the point data stack of unwrapped phase values (testsite.punw). No interpolation is applied, i.e. values are 0.0 (NULL) except for the point list coordinates. The point list testsite.plist contains the point coordinates.
INSTALLATION
Source code pt2d.c in ./IPTA/src, executable version pt2d in
./IPTA/bin
DESCRIPTION
pt2d supports the conversion of image data from the IPTA vector
data format to the "normal" 2-D raster image format.
The input vector data is defined by the point list, the point data stack, the related record number. The SLC parameter file of the point list coordinates is not used. As geometric reference used to determine distance between point coordinates ground range and azimuth pixel spacings of the SLC reference need to be indicated on the command line. The ground range spacing (grps) can be calculated from the slant range spacing (rps) and the incidence angle (inc_ang) using grps = rps / sin(inc_ang). In addition, a point data stack of mask values can be indicated which specifies for each data point a zero or non-zero flag which is interpreted to ignor or consider a certain data point.
The output image can either be in the SLC geometry used for the point list coordinates (when indicating 1 for the range azimuth looks number) or in a multi-looked geometry (relative to the same SLC geometry, without offsets in range and azimuth, when indicating look numbers different from 1). No SLC/MLI parameter file needs to be provided.
Different data types (fcomplex, scomplex, float, int, short, byte) are supported. The data type of the output 2-D image data corresponds to the indicated data type of the input point data stack.
In the interpolation mode 0 (none) the output 2-D image data has non-zero values only at the point list coordinates. No interpolation is applied.
For the interpolation modes 1 to 4 output values are also determined for coordinates other than the point list coordinates. Some interpolation modes also modify (filter) the values at the point list coordinates.
In the interpolation modes 1 (3-pt_bilinear) and 2 (6-pt_bilinear) the three, respectively six, neighboring points of the Delaunay Triangulation Network are considered for the interpolation. A bilinear interpolator is used. These interpolators are spatially adaptive - the number of neighbors used is kept constant but the area considered may significantly vary. At the point list coordinates the output value corresponds to the corresponding to point data value, i.e. these values are not filtered.
In the interpolation mode 3 (convolution) the indicated window radius and minimum number of points are considered. For pixels which do not have the minimum number of point list coordinates within the indicated indicated window radius the output value is set to the NULL value. For pixels with a sufficient number of point list coordinates in their neighborhood a convolutional interpolator is applied. The same procedure is also applied for pixels corresponding to point list coordinates, i.e. these values are filtered.
In the interpolation mode 4 (convolution of nearest neighbors) the indicated window radius and minimum number of points are considered. For pixels which do not have the minimum number of point list coordinates within the indicated indicated window radius the output value is set to the NULL value. For pixels with a sufficient number of point list coordinates in their neighborhood a convolutional interpolator is applied, but only considering the values at the np_min nearest neighbors. This results in a spatial adaptivity with small windows used in areas of dense point occurence. The same procedure is also applied for pixels corresponding to point list coordinates, i.e. these values are filtered. The interpolation mode 4 is significantly more time consuming than interpolation mode 3.
In the case a point data stack of mask values is indicated, point data values which are masked (i.e. uchar value is 0 in the corresponding record at the coresponding position of the point data stack of mask values) are treated as NULL values at the same location. The use of such masking permits to ignor data values without needing to change the point list. Such masks can be different for each record permitting to selective deactivate individual data points.
The functionality of pt2data and pt2d are corresponding except that the output geometry is specified using an SLC/MLI parameter file in the case of pt2data while geometric parameters are directly indicated on the command line in pt2d.
OPTIONS
none.
SEE ALSO
pt2data, SLC_par, typedef_ISP.h, ipta.h.
© Copyrights for Documentation, Users Guide and Reference Manual by Gamma Remote Sensing, 2003.
UW, CW, TS, last change 20-Feb-2003.