OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
proj_define.h
Go to the documentation of this file.
1 /*
2  0 = Geographic
3  1 = Universal Transverse Mercator (UTM)
4  2 = State Plane Coordinates
5  3 = Albers Conical Equal Area
6  4 = Lambert Conformal Conic
7  5 = Mercator
8  6 = Polar Stereographic
9  7 = Polyconic
10  8 = Equidistant Conic
11  9 = Transverse Mercator
12  10 = Stereographic
13  11 = Lambert Azimuthal Equal Area
14  12 = Azimuthal Equidistant
15  13 = Gnomonic
16  14 = Orthographic
17  15 = General Vertical Near-Side Perspective
18  16 = Sinusiodal
19  17 = Equirectangular
20  18 = Miller Cylindrical
21  19 = Van der Grinten
22  20 = (Hotine) Oblique Mercator
23  21 = Robinson
24  22 = Space Oblique Mercator (SOM)
25  23 = Alaska Conformal
26  24 = Interrupted Goode Homolosine
27  25 = Mollweide
28  26 = Interrupted Mollweide
29  27 = Hammer
30  28 = Wagner IV
31  29 = Wagner VII
32  30 = Oblated Equal Area
33  99 = User defined
34  */
35 
36 #define GEO 0
37 #define UTM 1
38 #define SPCS 2
39 #define ALBERS 3
40 #define LAMCC 4
41 #define MERCAT 5
42 #define PS 6
43 #define POLYC 7
44 #define EQUIDC 8
45 #define TM 9
46 #define STEREO 10
47 #define LAMAZ 11
48 #define AZMEQD 12
49 #define GNOMON 13
50 #define ORTHO 14
51 #define GVNSP 15
52 #define SNSOID 16
53 #define EQRECT 17
54 #define MILLER 18
55 #define VGRINT 19
56 #define HOM 20
57 #define ROBIN 21
58 #define SOM 22
59 #define ALASKA 23
60 #define GOOD 24
61 #define MOLL 25
62 #define IMOLL 26
63 #define HAMMER 27
64 #define WAGIV 28
65 #define WAGVII 29
66 #define OBEQA 30
67 #define USDEF 99
68 
69 #define IN_BREAK -2
70 #define COEFCT 15 /* projection coefficient count */
71 #define PROJCT 31 /* projection count */
72 #define DATMCT 20 /* datum count */
73 
74 #define MAXPROJ 30 /* Maximum projection number */
75 #define MAXUNIT 5 /* Maximum unit code number */
76 #define GEO_TERM 0 /* Array index for print-to-term flag */
77 #define GEO_FILE 1 /* Array index for print-to-file flag */
78 #define GEO_TRUE 1 /* True value for geometric true/false flags */
79 #define GEO_FALSE -1 /* False val for geometric true/false flags */
80 
81 #ifndef PI
82 #define PI 3.14159265358979323846
83 #endif
84 #define HALF_PI 1.57079632679489661923
85 #define TWO_PI 6.28318530717958647692
86 #define EPSLN 1.0e-10
87 #define R2D 57.2957795131
88 /*
89 #define D2R 0.0174532925199
90  */
91 #define D2R 1.745329251994328e-2
92 #define S2R 4.848136811095359e-6
93 
94 #define OK 0
95 #define ERROR -1
96 
97 /* Misc macros
98  -----------*/
99 #define SQUARE(x) x * x /* x**2 */
100 #define CUBE(x) x * x * x /* x**3 */
101 #define QUAD(x) x * x * x * x /* x**4 */
102 
103 #define GMAX(A, B) ((A) > (B) ? (A) : (B)) /* assign maximum of a and b */
104 #define GMIN(A, B) ((A) < (B) ? (A) : (B)) /* assign minimum of a and b */
105 
106 #define IMOD(A, B) (A) - (((A) / (B)) * (B)) /* Integer mod function */
107 
108 #define sincos SinCos