Statistics
| Revision:

svn-gvsig-desktop / tags / v1_12_0_Build_1417 / libraries / libjni-proj4 / include / proj_api.h @ 40002

History | View | Annotate | Download (4.84 KB)

1
/******************************************************************************
2
 * $Id: proj_api.h,v 1.13 2004/10/30 02:33:47 fwarmerdam Exp $
3
 *
4
 * Project:  PROJ.4
5
 * Purpose:  Public (application) include file for PROJ.4 API, and constants.
6
 * Author:   Frank Warmerdam, <warmerdam@pobox.com>
7
 *
8
 ******************************************************************************
9
 * Copyright (c) 2001, Frank Warmerdam <warmerdam@pobox.com>
10
 *
11
 * Permission is hereby granted, free of charge, to any person obtaining a
12
 * copy of this software and associated documentation files (the "Software"),
13
 * to deal in the Software without restriction, including without limitation
14
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15
 * and/or sell copies of the Software, and to permit persons to whom the
16
 * Software is furnished to do so, subject to the following conditions:
17
 *
18
 * The above copyright notice and this permission notice shall be included
19
 * in all copies or substantial portions of the Software.
20
 *
21
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27
 * DEALINGS IN THE SOFTWARE.
28
 ******************************************************************************
29
 *
30
 * $Log: proj_api.h,v $
31
 * Revision 1.13  2004/10/30 02:33:47  fwarmerdam
32
 * Updated release version.
33
 *
34
 * Revision 1.12  2004/09/16 15:14:01  fwarmerdam
35
 * * src/pj_open_lib.c: added pj_set_searchpath() provided by Eric Miller.
36
 *
37
 * Revision 1.11  2004/07/28 23:23:49  warmerda
38
 * Changed ra to es in declarations for pj_geocentric_to_geodetic()
39
 * and pj_geodetic_to_geocentric() as suggested by Britton Kerin.
40
 *
41
 * Revision 1.10  2004/05/04 03:28:01  warmerda
42
 * Updated version.
43
 *
44
 * Revision 1.9  2004/04/15 13:56:24  warmerda
45
 * added pj_get_release
46
 *
47
 * Revision 1.8  2003/03/31 14:52:38  warmerda
48
 * updated to 4.4.7
49
 *
50
 * Revision 1.7  2002/12/14 20:14:35  warmerda
51
 * added geocentric support
52
 *
53
 * Revision 1.6  2002/06/11 18:08:25  warmerda
54
 * Added the pj_get_def() function
55
 *
56
 * Revision 1.5  2002/01/09 14:36:22  warmerda
57
 * updated to 4.4.5
58
 *
59
 * Revision 1.4  2001/09/15 22:55:28  warmerda
60
 * final prep for 4.4.4 release
61
 *
62
 * Revision 1.3  2001/08/23 20:25:55  warmerda
63
 * added pj_set_finder function
64
 *
65
 * Revision 1.2  2001/06/02 03:35:36  warmerda
66
 * added pj_get_errno_ref()
67
 *
68
 * Revision 1.1  2001/04/06 01:24:22  warmerda
69
 * New
70
 *
71
 */
72

    
73
/* General projections header file */
74
#ifndef PROJ_API_H
75
#define PROJ_API_H
76

    
77
/* standard inclusions */
78
#include <math.h>
79
#include <stdlib.h>
80

    
81
#ifdef __cplusplus
82
extern "C" {
83
#endif
84

    
85
/* Try to update this every version! */
86
#define PJ_VERSION 449
87

    
88
extern char const pj_release[]; /* global release id string */
89

    
90
#define RAD_TO_DEG        57.29577951308232
91
#define DEG_TO_RAD        .0174532925199432958
92

    
93

    
94
extern int pj_errno;        /* global error return code */
95

    
96
#if !defined(PROJECTS_H)
97
    typedef struct { double u, v; } projUV;
98
    typedef void *projPJ;
99
    #define projXY projUV
100
    #define projLP projUV
101
#else
102
    typedef PJ *projPJ;
103
#   define projXY        XY
104
#   define projLP       LP
105
#endif
106

    
107
/* procedure prototypes */
108

    
109
projXY pj_fwd(projLP, projPJ);
110
projLP pj_inv(projXY, projPJ);
111

    
112
int pj_transform( projPJ src, projPJ dst, long point_count, int point_offset,
113
                  double *x, double *y, double *z );
114
int pj_datum_transform( projPJ src, projPJ dst, long point_count, int point_offset,
115
                        double *x, double *y, double *z );
116
int pj_geocentric_to_geodetic( double a, double es,
117
                               long point_count, int point_offset,
118
                               double *x, double *y, double *z );
119
int pj_geodetic_to_geocentric( double a, double es,
120
                               long point_count, int point_offset,
121
                               double *x, double *y, double *z );
122
int pj_compare_datums( projPJ srcdefn, projPJ dstdefn );
123
int pj_apply_gridshift( const char *, int, 
124
                        long point_count, int point_offset,
125
                        double *x, double *y, double *z );
126
void pj_deallocate_grids();
127
int pj_is_latlong(projPJ);
128
int pj_is_geocent(projPJ);
129
void pj_pr_list(projPJ);
130
void pj_free(projPJ);
131
void pj_set_finder( const char *(*)(const char *) );
132
void pj_set_searchpath ( int count, const char **path );
133
projPJ pj_init(int, char **);
134
projPJ pj_init_plus(const char *);
135
char *pj_get_def(projPJ, int);
136
projPJ pj_latlong_from_proj( projPJ );
137
void *pj_malloc(size_t);
138
void pj_dalloc(void *);
139
char *pj_strerrno(int);
140
int *pj_get_errno_ref();
141
const char *pj_get_release();
142

    
143
#ifdef __cplusplus
144
}
145
#endif
146

    
147
#endif /* ndef PROJ_API_H */
148