1ARPRAM(3NCARG) NCAR GRAPHICS ARPRAM(3NCARG)
2
3
4
6 ARPRAM - Preprocesses an area map that has been initialized by a call
7 to ARINAM and to which edges have been added by calls to AREDAM.
8
10 CALL ARPRAM (MAP,IF1,IF2,IF3)
11
13 #include <ncarg/ncargC.h>
14
15 void c_arpram (int *map, int if1, int if2, int if3)
16
18 Preprocessing an area map is a seven-step process that makes all of the
19 area-identifier information in the area map consistent:
20
21 Step 1: ARPRAM shortens edge segments whose projections on the X
22 axis are more than twice as long as the average. ARPRAM
23 does this by interpolating points along their lengths. This
24 improves efficiency when executing other parts of the
25 algorithm.
26
27 Step 2: ARPRAM locates all intersections of edge segments and
28 interpolates the intersection points along these edge
29 segments. This step can take a lot of time. If you set IF1
30 nonzero, then pairs of edge segments are examined for
31 intersections only if one of the pair has a left or a right
32 area identifier that is zero or negative.
33
34 Step 3: ARPRAM locates coincident edge segments (edge segments with
35 identical endpoints). If two such coincident edge segments
36 belong to the same group, one of them is removed; if they
37 belong to different groups, one of them is modified in such
38 a way that it will appear to be present when looking for
39 areas defined by edge segments in a particular group, but
40 absent when looking for areas defined by all edge segments.
41
42 Step 4: ARPRAM searches for and removes "dangling" edge segments
43 (those that do not contribute to enclosing any area). This
44 step is skipped if IF2 is nonzero.
45
46 Step 5: ARPRAM looks for holes in the areas defined by each edge
47 group and draws connecting edge segments between the edge
48 and the hole. This step is skipped if IF3 is nonzero.
49
50 Step 6: ARPRAM adjusts area identifier information in the area map.
51 It examines all the edge segments of each area in each
52 group to see what area identifier should be assigned to the
53 area, and then makes adjustments.
54
55 Step 7: Connecting lines that were inserted in step 5 are removed
56 from the area map.
57
58 You can put edges in an area map, preprocess it, add more edges,
59 preprocess it again, and so on.
60
61 Each of the routines ARDRLN, ARGTAI, and ARSCAM checks to make sure
62 that the area map has been preprocessed since the last time that edges
63 were added to it and, if not, calls ARPRAM; the only advantage to the
64 user of calling ARPRAM directly is to use the time-saving shortcuts
65 specified by the arguments IF1, IF2, and IF3.
66
67 The arguments of ARPRAM are as follows:
68
69
70 MAP (an input/output array of type INTEGER) - An array
71 containing an area map that has been initialized by a call
72 to ARINAM and to which edges have been added by calls to
73 AREDAM.
74
75 Note: As part of initializing the area map, ARINAM stores
76 the dimension of MAP in MAP(1); therefore, the dimension
77 does not have to be given as an argument in calls to
78 ARPRAM.)
79
80 IF1 (an input expression of type INTEGER) - If you set IF1
81 nonzero, ARPRAM checks a pair of edge segments for
82 intersection only if one of the pair has a left or right
83 area identifier that is zero or negative. This would be
84 appropriate for contour lines, which intersect the
85 perimeter, but do not intersect each other.
86
87 IF2 (an input expression of type INTEGER) - If you set IF2
88 nonzero, ARPRAM does not check for dangling edges. This
89 would be appropriate for contour lines, which are known not
90 to have any such edges. This is not appropriate for Ezmap
91 boundary lines, because the Ezmap dataset contains some
92 edge segments (small islands) that are formed by unclosed
93 curves.
94
95 IF3 (an input expression of type INTEGER) - If you set IF3
96 nonzero, ARPRAM speeds up the process of adjusting area
97 identifiers by omitting the consideration of "holes" in the
98 areas examined. This is appropriate for contour lines as
99 long as the left and right area identifiers provided at
100 each contour level are consistent with those provided at
101 the adjacent levels.
102
104 The C-binding argument descriptions are the same as the FORTRAN
105 argument descriptions.
106
108 Use the ncargex command to see the following relevant examples: eezmpa,
109 tareas, tezmpa, fsppoint.
110
112 To use ARPRAM or c_arpram, load the NCAR Graphics libraries ncarg,
113 ncarg_gks, and ncarg_c, preferably in that order.
114
116 See the areas man page for a description of all Areas error messages
117 and/or informational messages.
118
120 Online: areas, areas_params, ardbpa, ardrln, aredam, argeti, argetr,
121 argtai, arinam, armvam, arscam, arseti, arsetr, ncarg_cbind
122
123 Hardcopy: NCAR Graphics Contouring and Mapping Tutorial
124
126 Copyright (C) 1987-2009
127 University Corporation for Atmospheric Research
128 The use of this Software is governed by a License Agreement.
129
130
131
132UNIX March 1993 ARPRAM(3NCARG)