aboutsummaryrefslogtreecommitdiff
path: root/src/proj_4D_api.c
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2018-01-31 10:56:11 +0100
committerKristian Evers <kristianevers@gmail.com>2018-01-31 10:56:11 +0100
commite979bce36ccd2bc52cabc0b1192bc0f8d4ed6f33 (patch)
treed085407ddc842f25142b48c42e1e0ad978a2ea44 /src/proj_4D_api.c
parentb6c3d16dae36ed2dfd09e231c5171482553ff2d7 (diff)
downloadPROJ-e979bce36ccd2bc52cabc0b1192bc0f8d4ed6f33.tar.gz
PROJ-e979bce36ccd2bc52cabc0b1192bc0f8d4ed6f33.zip
Add pj_has_inverse().
With the introduction of the "inverted" flag on PJ objects you can no longer rely on checking that the inv, inv3d and inv4d functions are available on said PJ object. The function is used internally a few places and otherwise exposed in proj_api.h to ensure that users of the old programming interface can safely check if an operation has an inverse.
Diffstat (limited to 'src/proj_4D_api.c')
-rw-r--r--src/proj_4D_api.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c
index 4a416084..2c6bac2d 100644
--- a/src/proj_4D_api.c
+++ b/src/proj_4D_api.c
@@ -696,9 +696,7 @@ PJ_PROJ_INFO proj_pj_info(PJ *P) {
pj_strlcpy(info.definition, &def[1], sizeof(info.definition)); /* def includes a leading space */
pj_dealloc(def);
- /* this does not take into account that a pipeline potentially does not */
- /* have an inverse. */
- info.has_inverse = (P->inv != 0 || P->inv3d != 0 || P->inv4d != 0);
+ info.has_inverse = pj_has_inverse(P);
return info;
}