aboutsummaryrefslogtreecommitdiff
path: root/src/proj_internal.h
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-12-01 21:50:51 +0100
committerEven Rouault <even.rouault@spatialys.com>2021-12-01 21:50:51 +0100
commit6a43bee93b4bfff07777c727b8fd46d3e6403094 (patch)
tree43059ed1cf1153e80a1d1ea7a0cfff879f9617b4 /src/proj_internal.h
parent7dc8a59217c41c8cfefe7f9d97cb7dae4a8b8fbd (diff)
downloadPROJ-6a43bee93b4bfff07777c727b8fd46d3e6403094.tar.gz
PROJ-6a43bee93b4bfff07777c727b8fd46d3e6403094.zip
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 330869e0..0ae90cf6 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
**************************************************************************************/