ANSI-C program: takethat.c, takethat_dem_par.c
NAME
takethat - Extraction of values along profiles, in polygon
regions, or for indicated positions (pixel numbers
specified).
SYNOPSIS
takethat <data_in> <width> <positions>
<report> [mode] [zero_flag] [nn_flag]
[print_flag]
<data_in> | (input) input data file (float) |
<width> | samples per row of data_in |
<positions> | (input) text file containing list of positions: column number, row number |
<report> | (output) text file containing extracted values |
[mode] | data extraction mode (default = 0) 0 : extract values along the profile connecting the indicated positions 1 : extract values in the polygon region specified by the indicated positions 2 : extract values at the indicated positions |
[zero_flag] | interpret 0.0 as missing value (default=0: 0.0 indicates missing value, 1: 0.0 is valid value) |
[nn_flag] | resampling algorithm flag in the case of extraction along a profile (default=0: interpolation algorithm, 1: nearest neighbor) |
[print_flag] | print flag (default=0:print values at all positions 1:print only positions with valid data) |
takethat_dem_par <data_in> <width>
<positions> <DEM_par> <report> [type_flag]
[zero_flag] [nn_flag] [print_flag]
<data_in> | (input) input data file (float) |
<width> | samples per row of data_in |
<positions> | (input) text containing list of positions: easting/longitude, northing/latitude |
<DEM_par> | DEM/MAP parameter file used to convert coordiantes to pixel numbers |
<report> | (output) text file containing extracted values |
[mode] | data extraction mode(default = 0) 0 : extract values along the profile connecting the indicated positions 1 : extract values in the polygon region specified by the indicated positions 2 : extract values at the indicated positions |
[zero_flag] | interpret 0.0 as missing value (default=0: 0.0 indicates missing value, 1: 0.0 is valid value) |
[nn_flag] | resampling algorithm flag in the case of extraction along a profile (default=0: interpolation algorithm, 1: nearest neighbor) |
[print_flag] | print flag (default=0:print values at all positions 1:print only positions with valid data) |
EXAMPLES
takethat 03781_25458.disp 2456 profile_coordinates.txt disp_profile.txt 0 0 1
Extract values from the displacement map 03781_25458.disp along the profile specified by the positions (column and row numbers) listed in the text file profile_coordinates. The extracted profile is written out to the report file. Nearest neighbor interpolation approach is specifiedtakethat_dem_par 03781_25458.UTM.disp 2456 profile_coordinates.txt 03781_25458.UTM.dem_par disp_profile.txt 0 0 1
Extract values from the geocoded displacement map 03781_25458.UTM.disp along the profile specified by the map coordiantes (easting and northing) listed in the text file profile_coordinates.txt. The extracted profile is written out to standard output which is redirected into the output ASCII file "disp_profile.txt". Nearest neighbor interpolation approach has been selected.INSTALLATION
Source code takethat.c and takethat_dem_par.c in ./src. For
compilation adjust and use Makefile. Executable version takethat
in ../bin
AVAILABILITY
Uses ISP type definition file typedef_ISP.h.
Uses DISP type definition file display.h.
DESCRIPTION
The programs takethat and takethat_dem_par allow to extract
values along a profile, in a polygonal region, or for a set of
specified positions. In the case of takethat the pixel numbers
(column and row numbers) are used while for takethat_dem_par the
map coordinates of the positions are are provided in a text file
that defines the profile, the polyogon region, or the list of
positions where to extract the values. The supported input data
file format is float (REAL*4). The output values are written to a
report file specified on the command line.
The DISP program polyras.c can be
used to select the positions and write its column and row
coordinates into a text file. Every line in the positions file
contains one position, i.e. a pair of column and row numbers.
Different profiles, polygon regions, or position lists are
seperated by an empty line:
88 179 1
96 152 2
129 109 3
188 279 1
196 252 2
229 209 3
250 209 3
200 300 1
400 300 2
For the extraction along a profile the values are extracted in regular intervals corresponding to the distance of one pixel for each start and stop position. The distance along the profile is written to the standard output together with the number of positions, the column and row numbers of the positions and the extracted values. An interpolation algortihm or the nearest neighbor algorithm may be selected for the determination of the output values.
OPTIONS
Data values of 0.0 can be interpreted as missing data or not. For
profiles (mode 0), the user may also specify via the print_flag
command line parameter if positions with zero data are listed in
the output report file.
SEE ALSO
typedef_ISP.h. display.h.
DIAGNOSTICS
All messages are generally self-explanatory.
© Copyrights for Documentation, Users Guide and Reference Manual by Gamma Remote Sensing, 2004.
UW, CW, TS, last change 9-Apr-2004.