aboutsummaryrefslogtreecommitdiff
path: root/src/projects.h
diff options
context:
space:
mode:
authorThomas Knudsen <thokn@sdfe.dk>2018-01-05 12:03:21 +0100
committerKristian Evers <kristianevers@gmail.com>2018-01-31 16:25:32 +0100
commit90968ff934a348b02f982080f8b7ccf17e037a46 (patch)
treea8293e8215edd66a09f9f986748dfc6231cde4cc /src/projects.h
parente979bce36ccd2bc52cabc0b1192bc0f8d4ed6f33 (diff)
downloadPROJ-90968ff934a348b02f982080f8b7ccf17e037a46.tar.gz
PROJ-90968ff934a348b02f982080f8b7ccf17e037a46.zip
Introduce compatibility for cs2cs-style proj-strings into the 4D API.
Parameters such as towgs84, nadgrids and geoidgrids was previously only handled by pj_transform(). This commit add a compatibility layer in proj_create() by calling the pj_cs2cs_emulation_setup() function. This function sets up a handful of predefined transformation objects on the PJ object that is being created. Each of these transformation objects are related to the cs2cs-style parameters we are trying to emulate in the 4D API. That is, if the +towgs84 parameters is used we create P->helmert with the parameters specified in +towgs84. Similarly for +axis, +nadgrids and +geoidgrids. When these transformation objects exists we use them in the prepare and finalize functions in pj_fwd/ pj_inv. If no cs2cs-style parametes are specified we skip those parts of the prepare and finalizing steps. Co-authored-by:Thomas Knudsen <thokn@sdfe.dk> Co-authored-by:Kristian Evers <kristianevers@gmail.com>
Diffstat (limited to 'src/projects.h')
-rw-r--r--src/projects.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/projects.h b/src/projects.h
index 86ca2524..aeaf09ae 100644
--- a/src/projects.h
+++ b/src/projects.h
@@ -349,6 +349,14 @@ struct PJconsts {
enum pj_io_units left; /* Flags for input/output coordinate types */
enum pj_io_units right;
+ /* These PJs are used for implementing cs2cs style coordinate handling in the 4D API */
+ PJ *axisswap;
+ PJ *cart;
+ PJ *cart_wgs84;
+ PJ *helmert;
+ PJ *hgridshift;
+ PJ *vgridshift;
+
/*************************************************************************************
@@ -394,7 +402,7 @@ struct PJconsts {
double from_greenwich; /* prime meridian offset (in radians) */
double long_wrap_center; /* 0.0 for -180 to 180, actually in radians*/
int is_long_wrap_set;
- char axis[4]; /* TODO: Description needed */
+ char axis[4]; /* Axis order, pj_transform/pj_adjust_axis */
/* New Datum Shift Grid Catalogs */
char *catalog_name;