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 */
41struct 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
51struct gpj_datum {
52 char *name, *longname, *ellps;
53 double dx, dy, dz;
54};
55
56/* no longer needed with PROJ6+ */
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
69 *next; /**< Pointer to next set of
70 * transform parameters in linked list */
71};
72
73struct gpj_ellps {
74 char *name, *longname;
75 double a, es, rf;
76};
77
79
80#endif
struct gpj_datum_transform_list * next
Definition gprojects.h:68
double dz
Definition gprojects.h:53
char * longname
Definition gprojects.h:52
double dy
Definition gprojects.h:53
char * ellps
Definition gprojects.h:52
double dx
Definition gprojects.h:53
char * name
Definition gprojects.h:52
double es
Definition gprojects.h:75
char * name
Definition gprojects.h:74
double a
Definition gprojects.h:75
double rf
Definition gprojects.h:75
char * longname
Definition gprojects.h:74
char proj[100]
Definition gprojects.h:45
int zone
Definition gprojects.h:44
char * def
Definition gprojects.h:46
PJ * pj
Definition gprojects.h:42
char * srid
Definition gprojects.h:47
char * wkt
Definition gprojects.h:48
double meters
Definition gprojects.h:43