From 8a156921b9483d82693c7a9e426c629a941fcce1 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 2 Dec 2021 17:18:13 +0100 Subject: Merge pull request #2966 from rouault/fix_2965 Cache result of proj_get_type() to help for performance of proj_factors() (fixes #2965) --- src/proj_internal.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/proj_internal.h') diff --git a/src/proj_internal.h b/src/proj_internal.h index 6edb6aec..2b2fb959 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -573,6 +573,9 @@ struct PJconsts { mutable bool gridsNeededAsked = false; mutable std::vector gridsNeeded{}; + // cache pj_get_type() result to help for repeated calls to proj_factors() + mutable PJ_TYPE type = PJ_TYPE_UNKNOWN; + /************************************************************************************* proj_create_crs_to_crs() alternative coordinate operations **************************************************************************************/ -- cgit v1.2.3