GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71933
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gprojects.h
Go to the documentation of this file.
1 /*
2  ******************************************************************************
3  *
4  * MODULE: gproj library
5  * AUTHOR(S): Original Author unknown, probably Soil Conservation Service
6  * Paul Kelly
7  * PURPOSE: Include file for GRASS modules that use the PROJ.4
8  * wrapper functions
9  * COPYRIGHT: (C) 2003 by the GRASS Development Team
10  *
11  * This program is free software under the GNU General Public
12  * License (>=v2). Read the file COPYING that comes with GRASS
13  * for details.
14  *
15  *****************************************************************************/
16 
17 #ifndef GRASS_GPROJECTS_H
18 #define GRASS_GPROJECTS_H
19 
20 #include <grass/config.h>
21 #include <proj_api.h>
22 #ifdef HAVE_OGR
23 # include <ogr_srs_api.h>
24 #endif
25 
26 /* Data Files */
27 #define ELLIPSOIDTABLE "/etc/proj/ellipse.table"
28 #define DATUMTABLE "/etc/proj/datum.table"
29 #define DATUMTRANSFORMTABLE "/etc/proj/datumtransform.table"
30 /* GRASS relative location of datum conversion lookup tables */
31 #define GRIDDIR "/etc/proj/nad"
32 
33 struct pj_info
34 {
35  projPJ pj;
36  double meters;
37  int zone;
38  char proj[100];
39 };
40 
41 struct gpj_datum
42 {
43  char *name, *longname, *ellps;
44  double dx, dy, dz;
45 };
46 
48 {
49 
50  int count; /**< Transform Number (ordered list) */
51 
52  char *params; /**< PROJ.4-style datum transform parameters */
53 
54  char *where_used; /**< Comment text describing where (geographically)
55  * the transform is valid */
56 
57  char *comment; /**< Additional Comments */
58 
59  struct gpj_datum_transform_list *next; /**< Pointer to next set of
60  * transform parameters in linked list */
61 };
62 
63 struct gpj_ellps
64 {
65  char *name, *longname;
66  double a, es, rf;
67 };
68 
69 /* PROJ.4's private datastructures copied from projects.h as removed
70  from upstream; pending better solution. see:
71  http://trac.osgeo.org/proj/ticket/98 */
72 
73 typedef struct { double u, v; } LP;
74 
75 struct DERIVS {
76  double x_l, x_p; /* derivatives of x for lambda-phi */
77  double y_l, y_p; /* derivatives of y for lambda-phi */
78 };
79 
80 struct FACTORS {
81  struct DERIVS der;
82  double h, k; /* meridinal, parallel scales */
83  double omega, thetap; /* angular distortion, theta prime */
84  double conv; /* convergence */
85  double s; /* areal scale factor */
86  double a, b; /* max-min scale error */
87  int code; /* info as to analytics, see following */
88 };
89 /* end of copy */
90 
91 #include <grass/defs/gprojects.h>
92 
93 #endif
double b
Definition: gprojects.h:86
double a
Definition: gprojects.h:86
struct DERIVS der
Definition: gprojects.h:81
Definition: gprojects.h:73
double dx
Definition: gprojects.h:44
double x_p
Definition: gprojects.h:76
char proj[100]
Definition: gprojects.h:38
double thetap
Definition: gprojects.h:83
int zone
Definition: gprojects.h:37
double a
Definition: gprojects.h:66
double s
Definition: gprojects.h:85
double y_p
Definition: gprojects.h:77
char * name
Definition: gprojects.h:43
double h
Definition: gprojects.h:82
double omega
Definition: gprojects.h:83
projPJ pj
Definition: gprojects.h:35
int code
Definition: gprojects.h:87
char * ellps
Definition: gprojects.h:43
char * name
Definition: gprojects.h:65
char * longname
Definition: gprojects.h:43
double v
Definition: gprojects.h:73
char * longname
Definition: gprojects.h:65
double meters
Definition: gprojects.h:36
double es
Definition: gprojects.h:66
double y_l
Definition: gprojects.h:77
double dz
Definition: gprojects.h:44
double dy
Definition: gprojects.h:44
struct gpj_datum_transform_list * next
Definition: gprojects.h:59
double conv
Definition: gprojects.h:84
double k
Definition: gprojects.h:82
double rf
Definition: gprojects.h:66
double x_l
Definition: gprojects.h:76