aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-03-17 12:03:09 +0100
committerEven Rouault <even.rouault@spatialys.com>2020-03-17 12:03:09 +0100
commitac37a9127a96175b38d0a2a693f1a6219d4180af (patch)
tree3a120075bedd757e516f018fabbf5d66b2cd1587
parent781dedec1fc3b8452d12f67f3c8ddd9d45f724f4 (diff)
downloadPROJ-ac37a9127a96175b38d0a2a693f1a6219d4180af.tar.gz
PROJ-ac37a9127a96175b38d0a2a693f1a6219d4180af.zip
Deprecate proj_list_angular_units(). Follow-up of https://github.com/OSGeo/PROJ/pull/2065
-rw-r--r--src/conversions/unitconvert.cpp2
-rw-r--r--src/iso19111/common.cpp2
-rw-r--r--src/proj.h2
-rw-r--r--src/proj_internal.h1
-rw-r--r--src/units.cpp6
5 files changed, 10 insertions, 3 deletions
diff --git a/src/conversions/unitconvert.cpp b/src/conversions/unitconvert.cpp
index 6ce55b02..609b30e0 100644
--- a/src/conversions/unitconvert.cpp
+++ b/src/conversions/unitconvert.cpp
@@ -409,7 +409,7 @@ static double get_unit_conversion_factor(const char* name,
}
/* And then angular units */
- units = proj_list_angular_units();
+ units = pj_list_angular_units();
for (i = 0; (s = units[i].id) ; ++i) {
if ( strcmp(s, name) == 0 ) {
if( p_normalized_name ) {
diff --git a/src/iso19111/common.cpp b/src/iso19111/common.cpp
index 4606905b..e3c747b9 100644
--- a/src/iso19111/common.cpp
+++ b/src/iso19111/common.cpp
@@ -321,7 +321,7 @@ std::string UnitOfMeasure::exportToPROJString() const {
}
}
} else if (type() == Type::ANGULAR) {
- auto proj_angular_units = proj_list_angular_units();
+ auto proj_angular_units = pj_list_angular_units();
for (int i = 0; proj_angular_units[i].id != nullptr; i++) {
if (::fabs(proj_angular_units[i].factor - conversionToSI()) <
1e-10 * conversionToSI()) {
diff --git a/src/proj.h b/src/proj.h
index 4988e1d0..d2464d69 100644
--- a/src/proj.h
+++ b/src/proj.h
@@ -627,7 +627,7 @@ PJ_INIT_INFO PROJ_DLL proj_init_info(const char *initname);
const PJ_OPERATIONS PROJ_DLL *proj_list_operations(void);
const PJ_ELLPS PROJ_DLL *proj_list_ellps(void);
PROJ_DEPRECATED(const PJ_UNITS PROJ_DLL *proj_list_units(void), "Deprecated by proj_get_units_from_database");
-const PJ_UNITS PROJ_DLL *proj_list_angular_units(void);
+PROJ_DEPRECATED(const PJ_UNITS PROJ_DLL *proj_list_angular_units(void), "Deprecated by proj_get_units_from_database");
const PJ_PRIME_MERIDIANS PROJ_DLL *proj_list_prime_meridians(void);
/* These are trivial, and while occasionally useful in real code, primarily here to */
diff --git a/src/proj_internal.h b/src/proj_internal.h
index ffc73b06..a3bc9f17 100644
--- a/src/proj_internal.h
+++ b/src/proj_internal.h
@@ -888,6 +888,7 @@ int pj_get_suggested_operation(PJ_CONTEXT *ctx,
PJ_COORD coord);
const PJ_UNITS *pj_list_linear_units();
+const PJ_UNITS *pj_list_angular_units();
/* classic public API */
#include "proj_api.h"
diff --git a/src/units.cpp b/src/units.cpp
index 36f2d4c7..53f43163 100644
--- a/src/units.cpp
+++ b/src/units.cpp
@@ -58,6 +58,12 @@ pj_angular_units[] = {
{nullptr, nullptr, nullptr, 0.0}
};
+// For internal use
+const PJ_UNITS *pj_list_angular_units()
+{
+ return pj_angular_units;
+}
+
const PJ_UNITS *proj_list_angular_units()
{
return pj_angular_units;