GRASS 8 Programmer's Manual
8.6.0dev(2026)-1d1e47ad9d
Loading...
Searching...
No Matches
gprojects.h
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
* MODULE: gproj library
4
* AUTHOR(S): Original Author unknown, probably Soil Conservation Service
5
* Paul Kelly
6
* PURPOSE: Include file for GRASS modules that use the PROJ
7
* wrapper functions
8
* COPYRIGHT: (C) 2003 by the GRASS Development Team
9
*
10
* This program is free software under the GNU General Public
11
* License (>=v2). Read the file COPYING that comes with GRASS
12
* for details.
13
*
14
*****************************************************************************/
15
16
#ifndef GRASS_GPROJECTS_H
17
#define GRASS_GPROJECTS_H
18
19
#include <
grass/config.h
>
20
21
#include <ogr_srs_api.h>
22
23
/* TODO: clean up support for PROJ 5+ */
24
#include <proj.h>
25
#define RAD_TO_DEG 57.295779513082321
26
#define DEG_TO_RAD .017453292519943296
27
28
#ifndef PJ_WKT2_LATEST
29
/* update if new PROJ versions support new WKT2 standards */
30
#define PJ_WKT2_LATEST PJ_WKT2_2019
31
#endif
32
33
/* Data Files */
34
#define ELLIPSOIDTABLE "/etc/proj/ellipse.table"
35
#define DATUMTABLE "/etc/proj/datum.table"
36
#define DATUMTRANSFORMTABLE "/etc/proj/datumtransform.table"
37
/* GRASS relative location of datum conversion lookup tables */
38
#define GRIDDIR "/etc/proj/nad"
39
40
/* TODO: rename pj_ to gpj_ to avoid symbol clash with PROJ lib */
41
struct
pj_info
{
42
PJ *
pj
;
43
double
meters
;
44
int
zone
;
45
char
proj
[100];
46
char
*
def
;
47
char
*
srid
;
48
char
*
wkt
;
49
};
50
51
struct
gpj_datum
{
52
char
*
name
, *
longname
, *
ellps
;
53
double
dx
,
dy
,
dz
;
54
};
55
56
/* no longer needed with PROJ6+ */
57
struct
gpj_datum_transform_list
{
58
59
int
count
;
/**< Transform Number (ordered list) */
60
61
char
*
params
;
/**< PROJ.4-style datum transform parameters */
62
63
char
*
where_used
;
/**< Comment text describing where (geographically)
64
* the transform is valid */
65
66
char
*
comment
;
/**< Additional Comments */
67
68
struct
gpj_datum_transform_list
69
*
next
;
/**< Pointer to next set of
70
* transform parameters in linked list */
71
};
72
73
struct
gpj_ellps
{
74
char
*
name
, *
longname
;
75
double
a
,
es
,
rf
;
76
};
77
78
#include <
grass/defs/gprojects.h
>
79
80
#endif
config.h
gprojects.h
gpj_datum_transform_list
Definition
gprojects.h:57
gpj_datum_transform_list::comment
char * comment
Definition
gprojects.h:66
gpj_datum_transform_list::count
int count
Definition
gprojects.h:59
gpj_datum_transform_list::where_used
char * where_used
Definition
gprojects.h:63
gpj_datum_transform_list::params
char * params
Definition
gprojects.h:61
gpj_datum_transform_list::next
struct gpj_datum_transform_list * next
Definition
gprojects.h:68
gpj_datum
Definition
gprojects.h:51
gpj_datum::dz
double dz
Definition
gprojects.h:53
gpj_datum::longname
char * longname
Definition
gprojects.h:52
gpj_datum::dy
double dy
Definition
gprojects.h:53
gpj_datum::ellps
char * ellps
Definition
gprojects.h:52
gpj_datum::dx
double dx
Definition
gprojects.h:53
gpj_datum::name
char * name
Definition
gprojects.h:52
gpj_ellps
Definition
gprojects.h:73
gpj_ellps::es
double es
Definition
gprojects.h:75
gpj_ellps::name
char * name
Definition
gprojects.h:74
gpj_ellps::a
double a
Definition
gprojects.h:75
gpj_ellps::rf
double rf
Definition
gprojects.h:75
gpj_ellps::longname
char * longname
Definition
gprojects.h:74
pj_info
Definition
gprojects.h:41
pj_info::proj
char proj[100]
Definition
gprojects.h:45
pj_info::zone
int zone
Definition
gprojects.h:44
pj_info::def
char * def
Definition
gprojects.h:46
pj_info::pj
PJ * pj
Definition
gprojects.h:42
pj_info::srid
char * srid
Definition
gprojects.h:47
pj_info::wkt
char * wkt
Definition
gprojects.h:48
pj_info::meters
double meters
Definition
gprojects.h:43
include
grass
gprojects.h
Generated on Fri Apr 3 2026 06:59:51 for GRASS 8 Programmer's Manual by
1.9.8