From e979bce36ccd2bc52cabc0b1192bc0f8d4ed6f33 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Wed, 31 Jan 2018 10:56:11 +0100 Subject: 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. --- src/proj_4D_api.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/proj_4D_api.c') 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; } -- cgit v1.2.3