1MAPGRM(3NCARG) NCAR GRAPHICS MAPGRM(3NCARG)
2
3
4
6 MAPGRM - Draws lines of latitude and longitude masked against an
7 existing area map.
8
10 CALL MAPGRM (IAMA,XCRA,YCRA,MCRA,IAAI,IAGI,MNOG,ULPR)
11
13 #include <ncarg/ncargC.h>
14
15 void c_mapgrm (int *iama, float *xcra, float *ycra,
16 int mcra, int *iaai, int *iagi, int mnog,
17 int (*ulpr)(float *xcra, float *ycra, int *ncs,
18 int *iaai, int *iagi, int *nai))
19
21 IAMA (an input/output array, dimensioned as specified in a call
22 to the AREAS routine ARINAM, of type INTEGER) is the array
23 containing the area map against which lines of latitude and
24 longitude are to be masked. The area map must have been
25 initialized by a call to ARINAM; it may contain edges added
26 to it by calling MAPBLA, as is the case in the example
27 named "eezmpa", or it may contain a different set of edges
28 to create some other desired effect. For example, an area
29 map might be created that defines a region of interest,
30 within which user data is available and within which lines
31 of latitude and longitude are to be drawn. For more
32 details, see the reference document for the package named
33 AREAS.
34
35 XCRA and YCRA
36 (scratch arrays, dimensioned at least MCRA, of type REAL)
37 are to be used by MAPGRM in calls to the AREAS routine
38 ARDRLN; they will eventually be used in calls to the user-
39 provided line-processing routine ULPR.
40
41 MCRA (an input expression of type INTEGER) is the dimension of
42 the arrays XCRA and YCRA.
43
44 IAAI and IAGI
45 (scratch arrays, dimensioned at least NOGI, of type
46 INTEGER) are to be used by MAPGRM in calls to the AREAS
47 routine ARDRLN; they will eventually be used in calls to
48 the user-provided line-processing routine ULPR. The
49 mnemonics stand for "Integer Array of Area Identifiers" and
50 "Integer Array of Group Identifiers", respectively.
51
52 NOGI (an input expression of type INTEGER) is the dimension of
53 the arrays IAAI and IAGI. The mnemonic stands for "Number
54 Of Group Identifiers (of edges in the area map)", which
55 determines the required dimension of IAAI and IAGI.
56
57 ULPR is the name of the user-supplied line-processing routine.
58 It must be declared EXTERNAL in the routine that calls
59 MAPGRM, so that the compiler and loader will know that it
60 is the name of a routine to be called instead of a
61 variable. The user routine ULPR will be called once for
62 each piece of a latitude/longitude line resulting from the
63 masking process; it may decide to draw (or to not draw)
64 each such piece. ULPR will be called using a FORTRAN
65 statement like
66
67 CALL ULPR (XCRA,YCRA,NCRA,IAAI,IAGI,NGPS)
68
69 where XCRA and YCRA are real arrays holding the normalized
70 device coordinates of NCRA points defining a polyline which
71 is part of some latitude/longitude line and IAAI and IAGI
72 are integer arrays holding NGPS area-identifier/group-
73 identifier pairs for the area within which that piece of
74 the line lies. In writing ULPR, the user may rely upon a
75 SET call's having been done which makes it possible to use
76 normalized device coordinates in calls to routines like
77 CURVE, CURVED, GPL, etc. For more details, see the
78 reference document for the package named AREAS and, in
79 particular, the description of the subroutine ARDRLN.
80
82 The C-binding argument descriptions are the same as the FORTRAN
83 argument descriptions.
84
86 The statement
87
88 CALL MAPGRM (IAMA,XCRA,YCRA,MCRA,IAAI,IAGI,MNOG,ULPR)
89
90 does the same thing as the statement
91
92 CALL MAPGRD
93
94 except that the grid lines are drawn using calls to MAPITM and MAPIQM,
95 which does the masking of the lines against the area map defined by the
96 arguments in the call and passes the pieces resulting from the masking
97 process to a user-provided line-drawing routine.
98
100 Use the ncargex command to see the following relevant examples:
101 ccppole, cmpfil, cmpgrp, cmpitm, cmplab, cmpmsk, cmptit, cpex08,
102 eezmpa, tezmpa, fcover, ffex03, ffex05.
103
105 To use MAPGRM or c_mapgrm, load the NCAR Graphics libraries ncarg,
106 ncarg_gks, and ncarg_c, preferably in that order.
107
109 Online: ezmap, ezmap_params, mapaci, mapbla, mapblm, mapdrw, mapeod,
110 mapfst, mapgci, mapgrd, mapgtc, mapgti, mapgtl, mapgtr, mapint, mapiq,
111 mapiqa, mapiqd, mapiqm, mapit, mapita, mapitm, mapitd, maplbl, maplmb,
112 maplot, mappos, maproj, maprs, maprst, mapsav, mapset, mapstc, mapsti,
113 mapstl, mapstr, maptra, maptri, maptrn, mapusr, mapvec, mpchln, mpfnme,
114 mpgetc, mpgeti, mpgetl, mpgetr, mpglty, mpiaty, mpifnb, mpilnb, mpiola,
115 mpiosa, mpipai, mpipan, mpipar, mpisci, mplnam, mplndm, mplndr, mplnri,
116 mpname, mprset, mpsetc, mpseti, mpsetl, mpsetr, supmap, supcon,
117 ncarg_cbind
118
119 Hardcopy: NCAR Graphics Contouring and Mapping Tutorial
120
122 Copyright (C) 1987-2009
123 University Corporation for Atmospheric Research
124 The use of this Software is governed by a License Agreement.
125
126
127
128UNIX March 1993 MAPGRM(3NCARG)