Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libjni-readecw-linux / include / gdt_pub.h @ 10630

History | View | Annotate | Download (4.53 KB)

1 1448 igbrotru
2
/* gdt_public.h */
3
/**
4
** EDITS
5
** [01] 11Jun98 pg        added gdt protos
6
*/
7
#ifndef ERM_GDTH
8
#define ERM_GDTH
9
10
#include  "platform.h"
11
#include  "gdt_stat.h"
12
13
/*============================*/
14
/*    TYPES AND CONSTANTS     */
15
16
typedef long int  t_coord_sys_id  ;
17
18
typedef struct { double x; double y; double z; } point3;
19
20
/* --- status values for the transformation set-up --- */
21
/* NB the signs of the statuses below must not be changed */
22
#define   TRN_STAT_OK      0
23
#define   TRN_STAT_INRES   1
24
#define   TRN_STAT_COMP    2
25
#define   TRN_STAT_BAD     3
26
#define   TRN_STAT_PROTO  -1
27
28
/* --- Modes for the transformation --- */
29
#define   TRN_MODE_INFINITE       1
30
#define   TRN_MODE_FINITE         2
31
#define   TRN_MODE_RESTRICTED     3
32
#define   TRN_MODE_NATURAL        4
33
#define   TRN_MODE_CURRENT        5
34
35
/* --- Longline modes (for polyline conversion) --- */
36
#define   LONG_MER_PAR            0
37
#define   LONG_LOXODROME          1
38
#define   LONG_NORMAL_SECTION     2
39
#define   LONG_STRAIGHT           3
40
41
/* Validation flags ( can be returned from gdt_inq_status_coord_sys() )   */
42
#define   GDT_CHK_M_SPHEROID     1
43
#define   GDT_CHK_M_LONGITUDE    2
44
45
/* --- Status values for transformation function, gdt_transform() --- */
46
/*     are defined in  "gdt_stat.h"  */
47
48
49
/* --- Modes for use with gdt_debug() --- */
50
#define   GDT_INIT          1
51
#define   GDT_BASE          2
52
#define   GDT_COORD_SYS     4
53
#define   GDT_TRANS         8
54
#define   GDT_TRANS_BRIEF   16
55
#define   GDT_ALL          ~0
56
57
58
/*===============================================*/
59
/*    FUNCTION PROTOTYPES (public functions)     */
60
61
62
long int        gdt_install_error( void (*error_func)()  );
63
long int        gdt_install_error_f( void (*error_func)()  );
64
65
t_coord_sys_id  gdt_create_coord_sys( char*  datum_name,
66
                                      char*  proj_name,
67
                                      char*  units );
68
69
t_coord_sys_id  gdt_crelock_coord_sys( char*  datum_name,
70
                                       char*  proj_name,
71
                                       char*  units );
72
73
long int        gdt_check_creation_coord_sys( char*  datum_name,
74
                                              char*  proj_name,
75
                                              char*  units );
76
77
long int        gdt_inq_status_coord_sys( t_coord_sys_id *id);
78
79
t_coord_sys_id  gdt_copy_coord_sys  ( t_coord_sys_id  *source_id );
80
long int        gdt_lock_coord_sys  ( t_coord_sys_id  *id );
81
long int        gdt_delete_coord_sys( t_coord_sys_id  *id );
82
t_coord_sys_id  gdt_next_coord_sys  ( t_coord_sys_id  *next_flag);
83
84
long int        gdt_mod_coord_sys   ( t_coord_sys_id  *id,
85
                                      char            *entity_name,
86
                                      char            *attrib_name,
87
                                      char            *data_type,
88
                                      void            *data);
89
90
long int        gdt_inq_coord_sys   ( t_coord_sys_id  *id,
91
                                      char            *entity_name,
92
                                      char            *attrib_name,
93
                                      char            *data_type,
94
                                      void            *data,
95
                                      int              size);
96
97
long int        gdt_set_source( t_coord_sys_id  *source_id );
98
long int        gdt_set_target( t_coord_sys_id  *target_id );
99
long int        gdt_inq_trans_status(void);
100
long int        gdt_mod_num_points( long int *num_points );
101
long int        gdt_mod_trans_mode( long int *new_mode );
102
103
t_coord_sys_id  gdt_inq_source();
104
t_coord_sys_id  gdt_inq_target();
105
long int        gdt_inq_trans_mode( long int *test_mode );
106
107
long int        gdt_inq_next_base( char * next_base );
108
109
long int  gdt_transform( double  * x_in,
110
                         double  * y_in,
111
                         double  * z_in,
112
                         double  * x_out,
113
                         double  * y_out,
114
                         double  * z_out);
115
116
long int  gdt_trans_array( long  int   *npoints,
117
                           point3  xyz_in_array[],
118
                           point3  xyz_out_array[] );
119
120
long int  gdt_trans_polyline( long int *longline_type,
121
                              long  int   *npoints,
122
                              point3  xyz_in_array[],
123
                              long  int   *max_lines,
124
                              long  int   *max_points,
125
                              long  int   lines[][2],
126
                              point3  xyz_out_array[] );
127
128
long int  gdt_debug( long int mode );
129
130
/* --- EOF --- */
131
132
#endif /* ERM_GDTH */