ANSI-C program: DISP/src/polyras.c
as part of DISP package.
NAME
polyras - Test-area selection (polygons) using a SUN or BMP
raster file for display
SYNOPSIS
polyras <image> [mag] [win_sz] >
[polygons]
<image> | SUN raster (*.ras) or BMP (*.bmp) file |
[mag] | magnification factor (default=2) |
[win_sz] | size of input data region to be magnified (default=160) |
> | shell command to redirect standard output |
[polygons] | output (text) file for polygons (default: stdout) |
EXAMPLE
polyras 1352_1610.cc.ras 2 200 >
1352_1610.poly
INSTALLATION
Source code polyras.c provided as part of the DISP package.
DESCRIPTION
polyras displays a raster image and allows selection and
storage of the vertices of polygons. Pressing the left mouse
button displays the area around the cursor in the zoom window. To
select a test-area (corresponding for example to a field, forest
stand, etc.) a polygon marking the test-area is generated. Move
the cursor to the first polygon corner and zoom using the left
mouse button. Enter this point into the list of polygon vertices
by pressing the right mouse button. Then move the cursor to
adjacent vertices and entering them by right-clicking the mouse.
To close the polygon, double right click without moving on the
last vertex. Successive polygons can be selected by repeating the
above procedure. Exit the progam by clicking on the
close button. The center mouse button can be used to
display different color tables.
The lists containing the corner number and the corner coordinates for each polygon are are written to standard output and possibly redirected to the indicated text file on the command line. Polygons are seperated by a blank line in the output with each line containing a polygon corner. Each vertex is specfied by the integer positions in x and y followed by the vertex counter value. Programs polyx.c and polyx_phase.c may then be used to extract values from the selected regions. Program histogram.c can calculate the histogram of the values. Finally, arithmetic operations can be performed on the data values within a region using program poly_math.c.
It is important that the selected rasterfile is not left/right flipped. Otherwise the polygons corner values will be in flipped geometry and will not match the selected areas in the (unflipped) original geometry of the binary files.
OPTIONS
The magnification factor and zoom window size can be specified on
the command line. This program replaces the previous LAT programs
poly_cc and poly_mph.
SEE ALSO
polyx.c, histogram.c, poly_math.c
© Copyrights for Documentation, Users Guide and Reference Manual by Gamma Remote Sensing, 2006.
UW, CW, last change 19-Jun-2006.