libgeotiff
|
00001 /* 00002 * geonames.h 00003 * 00004 * This encapsulates all of the value-naming mechanism of 00005 * libgeotiff. 00006 * 00007 * Written By: Niles Ritter 00008 * 00009 * Revision History: 00010 * 00011 * Author Date Key Changes/Additions 00012 * ------ ---------- ------------------------------------- 00013 * ndr 10 Jun 95 Inital Beta Release 00014 * ndr 28 Jul 95 Added ModelType aliases, Kv aliases. 00015 */ 00016 00017 #ifndef __geonames_h 00018 #define __geonames_h 00019 00020 struct _KeyInfo { 00021 int ki_key; 00022 char *ki_name; 00023 }; 00024 typedef struct _KeyInfo KeyInfo; 00025 00026 /* If memory is a premium, then omitting the 00027 * long name lists may save some space; simply 00028 * #define OMIT_GEOTIFF_NAMES in the compile statement 00029 * to remove all key->string translation. 00030 */ 00031 #ifdef ValuePair 00032 # undef ValuePair 00033 #endif 00034 00035 #ifndef OMIT_GEOTIFF_NAMES 00036 #define ValuePair(token,value) {token,#token}, 00037 #else 00038 #define ValuePair(token,value) 00039 #endif 00040 00041 #define END_LIST { -1, (char *)0} 00042 00043 /************************************************************ 00044 * 6.2.x GeoTIFF Keys 00045 ************************************************************/ 00046 00047 static KeyInfo _keyInfo[] = { 00048 # include "geokeys.inc" /* geokey database */ 00049 END_LIST 00050 }; 00051 00052 #define COMMON_VALUES \ 00053 {KvUndefined, "Undefined"}, \ 00054 {KvUserDefined,"User-Defined"}, \ 00055 ValuePair(KvUndefined,KvUndefined) \ 00056 ValuePair(KvUserDefined,KvUserDefined) 00057 00058 static KeyInfo _csdefaultValue[] = { 00059 COMMON_VALUES 00060 END_LIST 00061 }; 00062 00063 /************************************************************ 00064 * 6.3.x GeoTIFF Key Values 00065 ************************************************************/ 00066 00067 static KeyInfo _modeltypeValue[] = { 00068 COMMON_VALUES 00069 ValuePair(ModelTypeProjected,1) 00070 ValuePair(ModelTypeGeographic,2) 00071 ValuePair(ModelTypeGeocentric,3) 00072 ValuePair(ModelProjected,1) /* aliases */ 00073 ValuePair(ModelGeographic,2) /* aliases */ 00074 ValuePair(ModelGeocentric,3) /* aliases */ 00075 END_LIST 00076 }; 00077 00078 static KeyInfo _rastertypeValue[] = { 00079 COMMON_VALUES 00080 ValuePair(RasterPixelIsArea,1) 00081 ValuePair(RasterPixelIsPoint,2) 00082 END_LIST 00083 }; 00084 00085 static KeyInfo _geounitsValue[] = { 00086 COMMON_VALUES 00087 # include "epsg_units.inc" 00088 END_LIST 00089 }; 00090 00091 static KeyInfo _geographicValue[] = { 00092 COMMON_VALUES 00093 # include "epsg_gcs.inc" 00094 END_LIST 00095 }; 00096 00097 static KeyInfo _geodeticdatumValue[] = { 00098 COMMON_VALUES 00099 # include "epsg_datum.inc" 00100 END_LIST 00101 }; 00102 00103 static KeyInfo _ellipsoidValue[] = { 00104 COMMON_VALUES 00105 # include "epsg_ellipse.inc" 00106 END_LIST 00107 }; 00108 00109 static KeyInfo _primemeridianValue[] = { 00110 COMMON_VALUES 00111 # include "epsg_pm.inc" 00112 END_LIST 00113 }; 00114 00115 static KeyInfo _pcstypeValue[] = { 00116 COMMON_VALUES 00117 # include "epsg_pcs.inc" 00118 END_LIST 00119 }; 00120 00121 static KeyInfo _projectionValue[] = { 00122 COMMON_VALUES 00123 # include "epsg_proj.inc" 00124 END_LIST 00125 }; 00126 00127 static KeyInfo _coordtransValue[] = { 00128 COMMON_VALUES 00129 # include "geo_ctrans.inc" 00130 END_LIST 00131 }; 00132 00133 static KeyInfo _vertcstypeValue[] = { 00134 COMMON_VALUES 00135 # include "epsg_vertcs.inc" 00136 END_LIST 00137 }; 00138 00139 static KeyInfo _vdatumValue[] = { 00140 COMMON_VALUES 00141 ValuePair(VDatumBase,1) 00142 END_LIST 00143 }; 00144 00145 #endif /* __geonames_h */ 00146