aboutsummaryrefslogtreecommitdiff
path: root/src/proj_internal.h
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-12-02 23:08:35 +0100
committerGitHub <noreply@github.com>2021-12-02 23:08:35 +0100
commitd9d55ed203de5e37d8a901beeea9cad37a74f1d4 (patch)
tree6d80fbe8d854bd8ced2f4700fbcd2b1ecaa0d7e2 /src/proj_internal.h
parent30f059a018a6ae862c18ec128e0ace14193ad5ee (diff)
parent8a156921b9483d82693c7a9e426c629a941fcce1 (diff)
downloadPROJ-d9d55ed203de5e37d8a901beeea9cad37a74f1d4.tar.gz
PROJ-d9d55ed203de5e37d8a901beeea9cad37a74f1d4.zip
Merge pull request #2967 from OSGeo/backport-2966-to-8.2
[Backport 8.2] Cache result of proj_get_type() to help for performance of proj_factors() (fixes #2965)
Diffstat (limited to 'src/proj_internal.h')
-rw-r--r--src/proj_internal.h3
1 files changed, 3 insertions, 0 deletions
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<NS_PROJ::operation::GridDescription> 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
**************************************************************************************/