1 /******************************************************************************
2 *  LibGHT, software to manage point clouds.
3 *  LibGHT is free and open source software provided by the Government of Canada
4 *  Copyright (c) 2012 Natural Resources Canada
5 *
6 *  Nouri Sabo <nsabo@NRCan.gc.ca>, Natural Resources Canada
7 *  Paul Ramsey <pramsey@opengeo.org>, OpenGeo
8 *
9 ******************************************************************************/
10 
11 #define GHT_MAX_HASH_LENGTH    18
12 #define GHT_FORMAT_VERSION      1
13 
14 
15 /***********************************************************************
16 * Common enumerations and structures found in both the public
17 * and private header files.
18 ************************************************************************/
19 
20 typedef enum
21 {
22     GHT_OK = 0,
23     GHT_ERROR = 1,
24     GHT_WARNING = 2,
25     GHT_DONE = (1<<8),
26     GHT_INCOMPLETE = (2<<8)
27 } GhtErr;
28 
29 typedef enum
30 {
31     GHT_UNKNOWN = 0,
32     GHT_INT8    = 1,  GHT_UINT8  = 2,
33     GHT_INT16   = 3,  GHT_UINT16 = 4,
34     GHT_INT32   = 5,  GHT_UINT32 = 6,
35     GHT_INT64   = 7,  GHT_UINT64 = 8,
36     GHT_DOUBLE  = 9,  GHT_FLOAT  = 10
37 } GhtType;
38 
39 #define GHT_TRY(functioncall) { if ( (functioncall) == GHT_ERROR ) { return GHT_ERROR; } }
40 
41 typedef struct
42 {
43     double x;
44     double y;
45 } GhtCoordinate;
46 
47 typedef struct
48 {
49     double min;
50     double max;
51 } GhtRange;
52 
53 typedef struct
54 {
55     GhtRange x;
56     GhtRange y;
57 } GhtArea;
58 
59 typedef struct
60 {
61     unsigned char  allow_duplicates;
62     unsigned char  max_hash_length;
63     unsigned char  version;
64     unsigned char  endian;
65 } GhtConfig;
66 
67 /* So we can alias char* to GhtHash* */
68 typedef char GhtHash;
69 
70 /* Access version information */
71 int ght_version_major(void);
72 int ght_version_minor(void);
73 int ght_version_patch(void);
74 char * ght_version(void);
75 
76