Debian Codegraph @

frmts/gtiff/libgeotiff/geonames.h

raw
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 * copyright (c) 1995 Niles D. Ritter
10 *
11 * Permission granted to use this software, so long as this copyright
12 * notice accompanies any products derived therefrom.
13 */
14
15 #ifndef LIBGEOTIFF_GEONAMES_H_
16 #define LIBGEOTIFF_GEONAMES_H_
17
18 struct _KeyInfo {
19 int ki_key;
20 const char *ki_name;
21 };
22 typedef struct _KeyInfo KeyInfo;
23
24 /* If memory is a premium, then omitting the
25 * long name lists may save some space; simply
26 * #define OMIT_GEOTIFF_NAMES in the compile statement
27 * to remove all key->string translation.
28 */
29 #ifdef ValuePair
30 # undef ValuePair
31 #endif
32
33 #ifndef OMIT_GEOTIFF_NAMES
34 #define ValuePair(token,value) {token,#token},
35 #else
36 #define ValuePair(token,value)
37 #endif
38
39 #define END_LIST { -1, 0 }
40
41 /************************************************************
42 * 6.2.x GeoTIFF Keys
43 ************************************************************/
44
45 static const KeyInfo _keyInfo[] = {
46 # include "geokeys.inc" /* geokey database */
47 END_LIST
48 };
49
50 /* Keys used by GeoTIFF 1.1 (OGC 19-008) */
51 static const KeyInfo _keyInfoV11[] = {
52 # include "geokeys_v1_1.inc" /* geokey database */
53 END_LIST
54 };
55
56 #define COMMON_VALUES \
57 {KvUndefined, "Undefined"}, \
58 {KvUserDefined,"User-Defined"}, \
59 ValuePair(KvUndefined,KvUndefined) \
60 ValuePair(KvUserDefined,KvUserDefined)
61
62 static const KeyInfo _csdefaultValue[] = {
63 COMMON_VALUES
64 END_LIST
65 };
66
67 /************************************************************
68 * 6.3.x GeoTIFF Key Values
69 ************************************************************/
70
71 static const KeyInfo _modeltypeValue[] = {
72 COMMON_VALUES
73 ValuePair(ModelTypeProjected,1)
74 ValuePair(ModelTypeGeographic,2)
75 ValuePair(ModelTypeGeocentric,3)
76 ValuePair(ModelProjected,1) /* aliases */
77 ValuePair(ModelGeographic,2) /* aliases */
78 ValuePair(ModelGeocentric,3) /* aliases */
79 END_LIST
80 };
81
82 static const KeyInfo _rastertypeValue[] = {
83 COMMON_VALUES
84 ValuePair(RasterPixelIsArea,1)
85 ValuePair(RasterPixelIsPoint,2)
86 END_LIST
87 };
88
89 static const KeyInfo _geounitsValue[] = {
90 COMMON_VALUES
91 # include "epsg_units.inc"
92 END_LIST
93 };
94
95 static const KeyInfo _geographicValue[] = {
96 COMMON_VALUES
97 # include "epsg_gcs.inc"
98 END_LIST
99 };
100
101 static const KeyInfo _geodeticdatumValue[] = {
102 COMMON_VALUES
103 # include "epsg_datum.inc"
104 END_LIST
105 };
106
107 static const KeyInfo _ellipsoidValue[] = {
108 COMMON_VALUES
109 # include "epsg_ellipse.inc"
110 END_LIST
111 };
112
113 static const KeyInfo _primemeridianValue[] = {
114 COMMON_VALUES
115 # include "epsg_pm.inc"
116 END_LIST
117 };
118
119 static const KeyInfo _pcstypeValue[] = {
120 COMMON_VALUES
121 # include "epsg_pcs.inc"
122 END_LIST
123 };
124
125 static const KeyInfo _projectionValue[] = {
126 COMMON_VALUES
127 # include "epsg_proj.inc"
128 END_LIST
129 };
130
131 static const KeyInfo _coordtransValue[] = {
132 COMMON_VALUES
133 # include "geo_ctrans.inc"
134 END_LIST
135 };
136
137 static const KeyInfo _vertcstypeValue[] = {
138 COMMON_VALUES
139 # include "epsg_vertcs.inc"
140 END_LIST
141 };
142
143 static const KeyInfo _vdatumValue[] = {
144 COMMON_VALUES
145 ValuePair(VDatumBase,1)
146 END_LIST
147 };
148
149 #endif /* LIBGEOTIFF_GEONAMES_H_ */