File: geonames.h

package info (click to toggle)
libgeotiff 1.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 3,300 kB
  • sloc: ansic: 8,080; sh: 3,977; makefile: 166
file content (143 lines) | stat: -rw-r--r-- 3,080 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/*
 * geonames.h
 *
 *  This encapsulates all of the value-naming mechanism of
 *  libgeotiff.
 *
 *  Written By: Niles Ritter
 *
 *  copyright (c) 1995   Niles D. Ritter
 *
 *  Permission granted to use this software, so long as this copyright
 *  notice accompanies any products derived therefrom.
 */

#ifndef LIBGEOTIFF_GEONAMES_H_
#define LIBGEOTIFF_GEONAMES_H_

struct _KeyInfo {
	int ki_key;
	char *ki_name;
};
typedef struct _KeyInfo KeyInfo;

/* If memory is a premium, then omitting the
 * long name lists may save some space; simply
 * #define OMIT_GEOTIFF_NAMES in the compile statement
 * to remove all key->string translation.
 */
#ifdef ValuePair
#  undef ValuePair
#endif

#ifndef OMIT_GEOTIFF_NAMES
#define ValuePair(token,value)  {token,#token},
#else
#define ValuePair(token,value)
#endif

#define END_LIST { -1, (char *)0}

/************************************************************
 *         6.2.x GeoTIFF Keys
 ************************************************************/

static const KeyInfo _keyInfo[] =  {
#   include "geokeys.inc"   /* geokey database */
    END_LIST
};

#define COMMON_VALUES \
   {KvUndefined, "Undefined"}, \
   {KvUserDefined,"User-Defined"}, \
   ValuePair(KvUndefined,KvUndefined) \
   ValuePair(KvUserDefined,KvUserDefined)

static const KeyInfo _csdefaultValue[] = {
   COMMON_VALUES
   END_LIST
};

/************************************************************
 *         6.3.x GeoTIFF Key Values
 ************************************************************/

static const KeyInfo _modeltypeValue[] = {
   COMMON_VALUES
    ValuePair(ModelTypeProjected,1)
    ValuePair(ModelTypeGeographic,2)
    ValuePair(ModelTypeGeocentric,3)
    ValuePair(ModelProjected,1)     /* aliases */
    ValuePair(ModelGeographic,2)    /* aliases */
    ValuePair(ModelGeocentric,3)    /* aliases */
   END_LIST
};

static const KeyInfo _rastertypeValue[] = {
   COMMON_VALUES
    ValuePair(RasterPixelIsArea,1)
    ValuePair(RasterPixelIsPoint,2)
   END_LIST
};

static const KeyInfo _geounitsValue[] = {
   COMMON_VALUES
#  include "epsg_units.inc"
   END_LIST
};

static const KeyInfo _geographicValue[] = {
   COMMON_VALUES
#  include "epsg_gcs.inc"
   END_LIST
};

static const KeyInfo _geodeticdatumValue[] = {
   COMMON_VALUES
#  include "epsg_datum.inc"
   END_LIST
};

static const KeyInfo _ellipsoidValue[] = {
   COMMON_VALUES
#  include "epsg_ellipse.inc"
   END_LIST
};

static const KeyInfo _primemeridianValue[] = {
   COMMON_VALUES
#  include "epsg_pm.inc"
   END_LIST
};

static const KeyInfo _pcstypeValue[] = {
   COMMON_VALUES
#  include "epsg_pcs.inc"
   END_LIST
};

static const KeyInfo _projectionValue[] = {
   COMMON_VALUES
#  include "epsg_proj.inc"
   END_LIST
};

static const KeyInfo _coordtransValue[] = {
   COMMON_VALUES
#  include "geo_ctrans.inc"
   END_LIST
};

static const KeyInfo _vertcstypeValue[] = {
   COMMON_VALUES
#  include "epsg_vertcs.inc"
   END_LIST
};

static const KeyInfo _vdatumValue[] = {
   COMMON_VALUES
    ValuePair(VDatumBase,1)
   END_LIST
};

#endif /* LIBGEOTIFF_GEONAMES_H_ */