libgeotiff
geonames.h
1 /*
2  * geonames.h
3  *
4  * This encapsulates all of the value-naming mechanism of
5  * libgeotiff.
6  *
7  * Written By: Niles Ritter
8  *
9  * Revision History:
10  *
11  * Author Date Key Changes/Additions
12  * ------ ---------- -------------------------------------
13  * ndr 10 Jun 95 Inital Beta Release
14  * ndr 28 Jul 95 Added ModelType aliases, Kv aliases.
15  */
16 
17 #ifndef __geonames_h
18 #define __geonames_h
19 
20 struct _KeyInfo {
21  int ki_key;
22  char *ki_name;
23 };
24 typedef struct _KeyInfo KeyInfo;
25 
26 /* If memory is a premium, then omitting the
27  * long name lists may save some space; simply
28  * #define OMIT_GEOTIFF_NAMES in the compile statement
29  * to remove all key->string translation.
30  */
31 #ifdef ValuePair
32 # undef ValuePair
33 #endif
34 
35 #ifndef OMIT_GEOTIFF_NAMES
36 #define ValuePair(token,value) {token,#token},
37 #else
38 #define ValuePair(token,value)
39 #endif
40 
41 #define END_LIST { -1, (char *)0}
42 
43 /************************************************************
44  * 6.2.x GeoTIFF Keys
45  ************************************************************/
46 
47 static KeyInfo _keyInfo[] = {
48 # include "geokeys.inc" /* geokey database */
49  END_LIST
50 };
51 
52 #define COMMON_VALUES \
53  {KvUndefined, "Undefined"}, \
54  {KvUserDefined,"User-Defined"}, \
55  ValuePair(KvUndefined,KvUndefined) \
56  ValuePair(KvUserDefined,KvUserDefined)
57 
58 static KeyInfo _csdefaultValue[] = {
59  COMMON_VALUES
60  END_LIST
61 };
62 
63 /************************************************************
64  * 6.3.x GeoTIFF Key Values
65  ************************************************************/
66 
67 static KeyInfo _modeltypeValue[] = {
68  COMMON_VALUES
69  ValuePair(ModelTypeProjected,1)
70  ValuePair(ModelTypeGeographic,2)
71  ValuePair(ModelTypeGeocentric,3)
72  ValuePair(ModelProjected,1) /* aliases */
73  ValuePair(ModelGeographic,2) /* aliases */
74  ValuePair(ModelGeocentric,3) /* aliases */
75  END_LIST
76 };
77 
78 static KeyInfo _rastertypeValue[] = {
79  COMMON_VALUES
80  ValuePair(RasterPixelIsArea,1)
81  ValuePair(RasterPixelIsPoint,2)
82  END_LIST
83 };
84 
85 static KeyInfo _geounitsValue[] = {
86  COMMON_VALUES
87 # include "epsg_units.inc"
88  END_LIST
89 };
90 
91 static KeyInfo _geographicValue[] = {
92  COMMON_VALUES
93 # include "epsg_gcs.inc"
94  END_LIST
95 };
96 
97 static KeyInfo _geodeticdatumValue[] = {
98  COMMON_VALUES
99 # include "epsg_datum.inc"
100  END_LIST
101 };
102 
103 static KeyInfo _ellipsoidValue[] = {
104  COMMON_VALUES
105 # include "epsg_ellipse.inc"
106  END_LIST
107 };
108 
109 static KeyInfo _primemeridianValue[] = {
110  COMMON_VALUES
111 # include "epsg_pm.inc"
112  END_LIST
113 };
114 
115 static KeyInfo _pcstypeValue[] = {
116  COMMON_VALUES
117 # include "epsg_pcs.inc"
118  END_LIST
119 };
120 
121 static KeyInfo _projectionValue[] = {
122  COMMON_VALUES
123 # include "epsg_proj.inc"
124  END_LIST
125 };
126 
127 static KeyInfo _coordtransValue[] = {
128  COMMON_VALUES
129 # include "geo_ctrans.inc"
130  END_LIST
131 };
132 
133 static KeyInfo _vertcstypeValue[] = {
134  COMMON_VALUES
135 # include "epsg_vertcs.inc"
136  END_LIST
137 };
138 
139 static KeyInfo _vdatumValue[] = {
140  COMMON_VALUES
141  ValuePair(VDatumBase,1)
142  END_LIST
143 };
144 
145 #endif /* __geonames_h */
146 
Definition: geonames.h:20