aboutsummaryrefslogtreecommitdiff
path: root/src/pj_init.c
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/pj_init.c
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/pj_init.c')
-rw-r--r--src/pj_init.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/pj_init.c b/src/pj_init.c
index f25c0344..51a742c7 100644
--- a/src/pj_init.c
+++ b/src/pj_init.c
@@ -769,26 +769,3 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) {
proj_errno_restore (PIN, err);
return PIN;
}
-
-
-
-/************************************************************************/
-/* pj_free() */
-/* */
-/* This is the application callable entry point for destroying */
-/* a projection definition. It does work generic to all */
-/* projection types, and then calls the projection specific */
-/* free function, P->destructor(), to do local work. */
-/* In most cases P->destructor()==pj_default_destructor. */
-/************************************************************************/
-
-void pj_free(PJ *P) {
- if (0==P)
- return;
- /* free projection parameters - all the hard work is done by */
- /* pj_default_destructor (in pj_malloc.c), which is supposed */
- /* to be called as the last step of the local destructor */
- /* pointed to by P->destructor. In most cases, */
- /* pj_default_destructor actually *is* what is pointed to */
- P->destructor (P, 0);
-}