OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimConstants.h
Go to the documentation of this file.
1 /********************************************************************
2  *
3  * License: See top level LICENSE.txt file.
4  *
5  * Author: Ken Melero
6  *
7  * Description: Common file for global constants.
8  *
9  **************************************************************************
10  * $Id: ossimConstants.h 22476 2013-11-07 16:08:32Z dburken $
11  */
12 #ifndef ossimConstants_HEADER
13 #define ossimConstants_HEADER 1
14 
15 #include <ossim/ossimConfig.h>
16 
17 #ifdef __cplusplus
18 # include <cfloat>
19 #else
20 # include <float.h>
21 #endif
22 
26 #ifdef _MSC_VER /* Quiet a bunch of MSVC warnings... */
27 # pragma warning(disable:4786) /* visual c6.0 compiler */
28 # pragma warning(disable:4251)/* for std:: member variable to have dll interface */
29 # pragma warning(disable:4275) /* for std:: base class to have dll interface */
30 # pragma warning(disable:4800) /* int forcing value to bool */
31 # pragma warning(disable:4244) /* conversion, possible loss of data */
32 #endif
33 #if defined(__GNUC__)
34 # define OSSIM_DEPRECATE_METHOD(func) func __attribute__ ((deprecated))
35 #elif defined(_MSC_VER)
36 # define OSSIM_DEPRECATE_METHOD(func) __declspec(deprecated) func
37 #else
38 # define OSSIM_DEPRECATE_METHOD(func)
39 #endif
40 
44 #if defined(OSSIM_STATIC)
45 # define OSSIMEXPORT
46 # define OSSIMIMPORT
47 # define OSSIMDLLEXPORT
48 # define OSSIM_DLL
49 # define OSSIMDLLEXPORT_DATA(type) type
50 # define OSSIM_DLL_DATA(type) type
51 # define OSSIMDLLEXPORT_CTORFN
52 #elif defined(__MINGW32__) || defined(__CYGWIN__) || defined(_MSC_VER) || defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__)
53 # define OSSIMEXPORT __declspec(dllexport)
54 # define OSSIMIMPORT __declspec(dllimport)
55 # ifdef OSSIMMAKINGDLL
56 # define OSSIMDLLEXPORT OSSIMEXPORT
57 # define OSSIM_DLL OSSIMEXPORT
58 # define OSSIMDLLEXPORT_DATA(type) OSSIMEXPORT type
59 # define OSSIM_DLL_DATA(type) OSSIMEXPORT type
60 # define OSSIMDLLEXPORT_CTORFN
61 # else
62 # define OSSIMDLLEXPORT OSSIMIMPORT
63 # define OSSIM_DLL OSSIMIMPORT
64 # define OSSIMDLLEXPORT_DATA(type) OSSIMIMPORT type
65 # define OSSIM_DLL_DATA(type) OSSIMIMPORT type
66 # define OSSIMDLLEXPORT_CTORFN
67 # endif
68 #else /* not #if defined(_MSC_VER) */
69 # define OSSIMEXPORT
70 # define OSSIMIMPORT
71 # define OSSIMDLLEXPORT
72 # define OSSIM_DLL
73 # define OSSIMDLLEXPORT_DATA(type) type
74 # define OSSIM_DLL_DATA(type) type
75 # define OSSIMDLLEXPORT_CTORFN
76 #endif /* #if defined(_MSC_VER) */
77 
81 #if 0 /* Comment out ALL this mess! */
82 #if defined(_MSC_VER) || defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNUC__) || defined(__WATCOMC__)
83 # if (_MSC_VER >= 1300) /* MSVC .NET 2003 version */
84 # define OSSIMEXPORT __declspec(dllexport)
85 # define OSSIMIMPORT __declspec(dllimport)
86 # else
87 # define OSSIMEXPORT __declspec(dllexport)
88 # define OSSIMIMPORT __declspec(dllimport)
89 # endif
90 #else /* compiler doesn't support __declspec() */
91 # define OSSIMEXPORT
92 # define OSSIMIMPORT
93 #endif
94 
95 #if defined(__WXPM__)
96 # if defined (__WATCOMC__)
97 # define OSSIMEXPORT __declspec(dllexport)
98  /*
99  __declspec(dllimport) prepends __imp to imported symbols. We do NOT
100  want that!
101  */
102 # define OSSIMIMPORT
103 # elif (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )))
104 # define OSSIMEXPORT _Export
105 # define OSSIMIMPORT _Export
106 # endif
107 #elif defined(__OSSIMMAC__)
108 # ifdef __MWERKS__
109 # define OSSIMEXPORT __declspec(export)
110 # define OSSIMIMPORT __declspec(import)
111 # endif
112 #endif
113 
114 #if defined(_MSC_VER)
115 # pragma warning(disable:4786) /* visual c6.0 compiler */
116 # pragma warning(disable:4251) /* for std:: member variable to have dll interface */
117 # pragma warning(disable:4275) /* for std:: base class to have dll interface */
118 # pragma warning(disable:4800) /* int forcing value to bool */
119 # pragma warning(disable:4244) /* conversion, possible loss of data */
120 
121 # ifdef OSSIMSINGLEDLL /* one gigantic dll, all declared export */
122 # ifdef EXPORT_OSMMATRIX
123 # define EXPORT_OSMMATRIX OSSIMEXPORT
124 # endif
125 # ifndef OSSIMDLLEXPORT
126 # define OSSIMDLLEXPORT OSSIMEXPORT
127 # endif
128 # ifdef EXPORT_OSMELEV
129 # define EXPORT_OSMELEV OSSIMEXPORT
130 # endif
131 # ifdef EXPORT_OSMSPTDATA
132 # define EXPORT_OSMSPTDATA OSSIMEXPORT
133 # endif
134 # ifdef EXPORT_ISO8211
135 # define EXPORT_ISO8211 OSSIMEXPORT
136 # endif
137 # ifdef EXPORT_OSMPROJ
138 # define EXPORT_OSMPROJ OSSIMEXPORT
139 # endif
140 # ifndef EXPORT_OSMIMAGING
141 # define EXPORT_OSMIMAGING OSSIMEXPORT
142 # endif
143 # else /* individual dlls, each with their own import/export symbols */
144 # ifndef EXPORT_OSMMATRIX
145 # ifdef OSMMATRIX_EXPORTS
146 # define EXPORT_OSMMATRIX OSSIMEXPORT
147 # else
148 # define EXPORT_OSMMATRIX OSSIMIMPORT
149 # endif
150 # endif
151 # ifndef OSSIMDLLEXPORT
152 # ifdef OSMBASE_EXPORTS
153 # define OSSIMDLLEXPORT OSSIMEXPORT
154 # else
155 # define OSSIMDLLEXPORT OSSIMIMPORT
156 # endif
157 # endif
158 # ifndef EXPORT_OSMELEV
159 # ifdef OSMELEV_EXPORTS
160 # define EXPORT_OSMELEV OSSIMEXPORT
161 # else
162 # define EXPORT_OSMELEV OSSIMIMPORT
163 # endif
164 # endif
165 # ifndef EXPORT_OSMSPTDATA
166 # ifdef OSMSPTDATA_EXPORTS
167 # define EXPORT_OSMSPTDATA OSSIMEXPORT
168 # else
169 # define EXPORT_OSMSPTDATA OSSIMIMPORT
170 # endif
171 # endif
172 # ifndef EXPORT_OSMPROJ
173 # ifdef OSMPROJ_EXPORTS
174 # define EXPORT_OSMPROJ OSSIMEXPORT
175 # else
176 # define EXPORT_OSMPROJ OSSIMIMPORT
177 # endif
178 # endif
179 # ifndef EXPORT_ISO8211
180 # ifdef ISO8211_EXPORTS
181 # define EXPORT_ISO8211 OSSIMEXPORT
182 # else
183 # define EXPORT_ISO8211 OSSIMIMPORT
184 # endif
185 # endif
186 # ifndef EXPORT_OSMIMAGING
187 # ifdef OSMIMAGING_EXPORTS
188 # define EXPORT_OSMIMAGING OSSIMEXPORT
189 # else
190 # define EXPORT_OSMIMAGING OSSIMIMPORT
191 # endif
192 # endif
193 # endif
194 #else /* defined(_MSC_VER) */
195 # ifdef OSSIMMAKINGDLL
196 # define OSSIMDLLEXPORT OSSIMEXPORT
197 # define OSSIM_DLL OSSIMEXPORT
198 # define OSSIMDLLEXPORT_DATA(type) OSSIMEXPORT type
199 # define OSSIM_DLL_DATA(type) OSSIMEXPORT type
200 # define OSSIMDLLEXPORT_CTORFN
201 # elif defined(OSSIMUSINGDLL)
202 # define OSSIMDLLEXPORT OSSIMIMPORT
203 # define OSSIM_DLL OSSIMIMPORT
204 # define OSSIMDLLEXPORT_DATA(type) OSSIMIMPORT type
205 # define OSSIM_DLL_DATA(type) OSSIMIMPORT type
206 # define OSSIMDLLEXPORT_CTORFN
207 # else /* not making nor using DLL */
208 # define OSSIMDLLEXPORT
209 # define OSSIM_DLL
210 # define OSSIM_DLL_DATA(type) type
211 # define OSSIMDLLEXPORT_DATA(type) type
212 # define OSSIMDLLEXPORT_CTORFN
213 # endif
214 # define EXPORT_OSMMATRIX OSSIMDLLEXPORT
215 # define EXPORT_OSMELEV OSSIMDLLEXPORT
216 # define EXPORT_OSMSPTDATA OSSIMDLLEXPORT
217 # define EXPORT_OSMPROJ OSSIMDLLEXPORT
218 # define EXPORT_OSMIMAGING OSSIMDLLEXPORT
219 #endif
220 #endif /* End of commented out "#if 0" old DLL import/export section. */
221 
222 /*
223  we know that if this is defined all other types are defined
224  since its included from ossimConfig.h
225 */
226 typedef char ossim_int8;
227 typedef unsigned char ossim_uint8;
228 typedef signed char ossim_sint8;
229 
230 typedef short ossim_int16;
231 typedef unsigned short ossim_uint16;
232 typedef signed short ossim_sint16;
233 
234 typedef int ossim_int32;
235 typedef unsigned int ossim_uint32;
236 typedef signed int ossim_sint32;
237 
238 typedef float ossim_float32;
239 typedef double ossim_float64;
240 
241 
242 typedef long long ossim_int64;
243 typedef unsigned long long ossim_uint64;
244 typedef signed long long ossim_sint64;
245 
247 
249 {
253 };
254 
255 //---
256 // For histogram builders. Note that FAST computation mode will not sample all tiles.
257 //---
259 {
263 };
264 
265 /*
266  Corner coordinates are relative to center (0) of pixel
267  or relative to the upper left of pixel (1).
268 */
270 {
273 };
274 
275 /*
276  Definitions for scalar type identification.
277 */
279 {
302  //---
303  // Below for backward compatibility only. Please use above enums in
304  // conjunction with null, min, max settings to determine bit depth.
305  //---
316 };
317 
318 /*
319  Definitions for interleave type identification.
320 */
322 {
324  OSSIM_BIL = 1, /* band interleaved by line */
325  OSSIM_BIP = 2, /* band interleaved by pixel */
326  OSSIM_BSQ = 3, /* band sequential */
327  OSSIM_BSQ_MULTI_FILE = 4 /* band sequential in separate files */
328 };
329 
330 /*
331  Definitions for origin location.
332 */
334 {
341 };
342 
343 /*
344  Definitions for coordinate system type.
345 */
347 {
353 };
354 
355 /*
356  Definitions for coordinate system orientation mode .
357 */
359 {
362 };
363 
364 /*
365  Definitions for unit type.
366 */
368 {
386 };
387 
390 {
392  OSSIM_NULL = 1, // not initialized
393  OSSIM_EMPTY = 2, // initialized but blank or empty
394  OSSIM_PARTIAL = 3, // contains some null/invalid values
395  OSSIM_FULL = 4 // all valid data
396 };
397 
400 {
411 };
412 
415 {
423 };
424 
426 {
429 };
430 
432 {
433  OSSIM_COMPARE_FULL=0, // compares full traversal if supported. Not just instance pointers
434  OSSIM_COMPARE_IMMEDIATE=1 // Only immediate attributes are compared
435 };
436 
437 #ifndef FLT_EPSILON
438 # define FLT_EPSILON __FLT_EPSILON__
439 #endif
440 
441 #ifndef DBL_EPSILON
442 # define DBL_EPSILON __DBL_EPSILON__
443 #endif
444 
445 #ifndef M_PI
446 # define M_PI ((ossim_float64)3.141592653589793238462643)
447 #endif
448 #ifndef TWO_PI
449 # define TWO_PI ((ossim_float64)(2.0 * M_PI))
450 #endif
451 #ifndef DEG_PER_RAD
452 # define DEG_PER_RAD ((ossim_float64)(180.0/M_PI))
453 #endif
454 #ifndef SEC_PER_RAD
455 # define SEC_PER_RAD ((ossim_float64)206264.8062471)
456 #endif
457 #ifndef RAD_PER_DEG
458 # define RAD_PER_DEG ((ossim_float64)(M_PI/180.0))
459 #endif
460 #ifndef MTRS_PER_FT
461 # define MTRS_PER_FT ((ossim_float64)0.3048)
462 #endif
463 #ifndef FT_PER_MTRS
464 # define FT_PER_MTRS ((ossim_float64)3.280839895013122)
465 #endif
466 #ifndef FT_PER_MILE
467 # define FT_PER_MILE ((ossim_float64)5280.0)
468 #endif
469 #ifndef SQRT_TWO_PI
470 # define SQRT_TWO_PI ((ossim_float64)2.50662827463100050242)
471 #endif
472 #ifndef SQRT_TWO_PI_DIV2
473 # define SQRT_TWO_PI_DIV2 ((ossim_float64)7.07106781186547524401E-1)
474 #endif
475 
476 #define TIFFTAG_OSSIM_METADATA 50955
477 #define OSSIM_DEFAULT_TILE_HEIGHT ((ossim_int32)64)
478 #define OSSIM_DEFAULT_TILE_WIDTH ((ossim_int32)64)
479 
480 /*
481  NOTE Reference for U.S. feet value:
482  U.S.G.S. "Map Projections - A Working Manual"
483  USGS Professional paper 1395 page 51
484 */
485 #ifndef US_METERS_PER_FT
486 # define US_METERS_PER_FT ((ossim_float64)0.3048006096)
487 #endif
488 
489 //---
490 // Integer nan kept for ossimIpt.
491 // This should be the most negative int: -2147483648
492 //---
493 #define OSSIM_INT_NAN ((ossim_sint32)0x80000000)
494 
495 #define OSSIM_DEFAULT_NULL_PIX_UCHAR ((ossim_uint8)0)
496 #define OSSIM_DEFAULT_MIN_PIX_UCHAR ((ossim_uint8)1)
497 #define OSSIM_DEFAULT_MAX_PIX_UCHAR ((ossim_uint8)255)
498 
499 #define OSSIM_DEFAULT_NULL_PIX_UINT8 ((ossim_uint8)0)
500 #define OSSIM_DEFAULT_MIN_PIX_UINT8 ((ossim_uint8)1)
501 #define OSSIM_DEFAULT_MAX_PIX_UINT8 ((ossim_uint8)255)
502 
503 #define OSSIM_DEFAULT_NULL_PIX_SINT8 ((ossim_sint8)0x80)
504 #define OSSIM_DEFAULT_MIN_PIX_SINT8 ((ossim_sint8)0x81)
505 #define OSSIM_DEFAULT_MAX_PIX_SINT8 ((ossim_sint8)0x7F)
506 
507 #define OSSIM_DEFAULT_NULL_PIX_SINT16 ((ossim_sint16)0x8000)
508 #define OSSIM_DEFAULT_MIN_PIX_SINT16 ((ossim_sint16)0x8001)
509 #define OSSIM_DEFAULT_MAX_PIX_SINT16 ((ossim_sint16)0x7FFF)
510 
511 #define OSSIM_DEFAULT_NULL_PIX_UINT16 ((ossim_uint16)0)
512 #define OSSIM_DEFAULT_MIN_PIX_UINT16 ((ossim_uint16)1)
513 #define OSSIM_DEFAULT_MAX_PIX_UINT16 ((ossim_uint16)0xFFFF)
514 
515 #define OSSIM_DEFAULT_NULL_PIX_SINT32 ((ossim_sint32)0x80000000)
516 #define OSSIM_DEFAULT_MIN_PIX_SINT32 ((ossim_sint32)0x80000001)
517 #define OSSIM_DEFAULT_MAX_PIX_SINT32 ((ossim_sint32)0x7FFFFFFF)
518 
519 #define OSSIM_DEFAULT_NULL_PIX_UINT32 ((ossim_uint32)0)
520 #define OSSIM_DEFAULT_MIN_PIX_UINT32 ((ossim_uint32)1)
521 #define OSSIM_DEFAULT_MAX_PIX_UINT32 ((ossim_uint32)0xFFFFFFFF)
522 
523 #define OSSIM_DEFAULT_NULL_PIX_SINT64 ((ossim_sint32)0x8000000000000000)
524 #define OSSIM_DEFAULT_MIN_PIX_SINT64 ((ossim_sint32)0x8000000000000001)
525 #define OSSIM_DEFAULT_MAX_PIX_SINT64 ((ossim_sint32)0x7FFFFFFFFFFFFFFF)
526 
527 #define OSSIM_DEFAULT_NULL_PIX_UINT64 ((ossim_uint32)0)
528 #define OSSIM_DEFAULT_MIN_PIX_UINT64 ((ossim_uint32)1)
529 #define OSSIM_DEFAULT_MAX_PIX_UINT64 ((ossim_uint32)0xFFFFFFFFFFFFFFFF)
530 
531 #define OSSIM_DEFAULT_NULL_PIX_UINT11 ((ossim_uint16)0)
532 #define OSSIM_DEFAULT_MIN_PIX_UINT11 ((ossim_uint16)1)
533 #define OSSIM_DEFAULT_MAX_PIX_UINT11 ((ossim_uint16)0x07FF)
534 
535 #define OSSIM_DEFAULT_NULL_PIX_UINT12 ((ossim_uint16)0)
536 #define OSSIM_DEFAULT_MIN_PIX_UINT12 ((ossim_uint16)1)
537 #define OSSIM_DEFAULT_MAX_PIX_UINT12 ((ossim_uint16)0x0FFF)
538 
539 #define OSSIM_DEFAULT_NULL_PIX_UINT13 ((ossim_uint16)0)
540 #define OSSIM_DEFAULT_MIN_PIX_UINT13 ((ossim_uint16)1)
541 #define OSSIM_DEFAULT_MAX_PIX_UINT13 ((ossim_uint16)0x1FFF)
542 
543 #define OSSIM_DEFAULT_NULL_PIX_UINT14 ((ossim_uint16)0)
544 #define OSSIM_DEFAULT_MIN_PIX_UINT14 ((ossim_uint16)1)
545 #define OSSIM_DEFAULT_MAX_PIX_UINT14 ((ossim_uint16)0x3FFF)
546 
547 #define OSSIM_DEFAULT_NULL_PIX_UINT15 ((ossim_uint16)0)
548 #define OSSIM_DEFAULT_MIN_PIX_UINT15 ((ossim_uint16)1)
549 #define OSSIM_DEFAULT_MAX_PIX_UINT15 ((ossim_uint16)0x7FFF)
550 
551 #define OSSIM_DEFAULT_NULL_PIX_FLOAT ((ossim_float32)-1.0/FLT_EPSILON)
552 #define OSSIM_DEFAULT_MIN_PIX_FLOAT ((ossim_float32)((-1.0/FLT_EPSILON) + 1))
553 #define OSSIM_DEFAULT_MAX_PIX_FLOAT ((ossim_float32)((1.0/FLT_EPSILON)))
554 
555 #define OSSIM_DEFAULT_NULL_PIX_NORM_FLOAT ((ossim_float32)0)
556 #define OSSIM_DEFAULT_MIN_PIX_NORM_FLOAT ((ossim_float32)((2*FLT_EPSILON)))
557 #define OSSIM_DEFAULT_MAX_PIX_NORM_FLOAT ((ossim_float32)1.0)
558 
559 #define OSSIM_DEFAULT_NULL_PIX_DOUBLE ((ossim_float64)-1.0/DBL_EPSILON)
560 #define OSSIM_DEFAULT_MIN_PIX_DOUBLE ((ossim_float64)((-1.0/DBL_EPSILON) + 1))
561 #define OSSIM_DEFAULT_MAX_PIX_DOUBLE ((ossim_float64)((1.0/DBL_EPSILON)))
562 
563 #define OSSIM_DEFAULT_NULL_PIX_NORM_DOUBLE ((ossim_float64)0)
564 #define OSSIM_DEFAULT_MIN_PIX_NORM_DOUBLE ((ossim_float64)((2*DBL_EPSILON)))
565 #define OSSIM_DEFAULT_MAX_PIX_NORM_DOUBLE ((ossim_float64)(1.0))
566 
567 #define OSSIM_DEFAULT_MEAN_SEA_LEVEL ((ossim_float64)0.0)
568 
569 #endif /* #ifndef ossimConstants_HEADER */
16 bit unsigned integer (15 bits used)
8 bit signed integer
ossim_int32 ossimErrorCode
char ossim_int8
Previous DLL import export section.
16 bit unsigned integer (12 bits used)
ossimHistogramMode
32 bit complex floating point
64 bit floating point
16 bit unsigned integer
ossimUnitType
16 bit unsigned integer (14 bits used)
float ossim_float32
16 bit signed integer
16 bit unsigned integer (14 bits used)
signed char ossim_sint8
16 bit unsigned integer (13 bits used)
16 bit unsigned integer (13 bits used)
ossimImageType
Definitions for image type identification.
ossimCompareType
32 bit floating point
unsigned short ossim_uint16
32 bit unsigned integer
ossimCoordSysOrientMode
double ossim_float64
ossimVertexOrdering
64 bit signed integer
signed short ossim_sint16
ossimMetadataType
Definitions for metadata type identification.
32 bit signed integer
unsigned long long ossim_uint64
unsigned int ossim_uint32
32 bit normalized floating point
signed int ossim_sint32
ossimByteOrder
ossimInterleaveType
ossimScalarType
16 bit complex integer
64 bit normalized floating point
ossimCoordinateSystemType
16 bit unsigned integer (11 bits used)
16 bit unsigned integer (15 bits used)
short ossim_int16
ossimPixelType
64 bit unsigned integer
long long ossim_int64
64 bit complex floating point
8 bit unsigned integer
ossimDataObjectStatus
Definitions for data object status.
32 bit complex integer
32 bit floating point
ossimOriginLocationType
16 bit unsigned integer (11 bits used)
16 bit unsigned iteger
64 bit floating point
16 bit signed integer
unsigned char ossim_uint8
signed long long ossim_sint64
8 bit unsigned iteger
int ossim_int32
16 bit unsigned integer (12 bits used)