aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-03-16 17:55:36 +0100
committerGitHub <noreply@github.com>2020-03-16 17:55:36 +0100
commit175cbad0a7ca202cefff33f240100b01752f8f73 (patch)
tree3969a91e8499312c698d928f262d219d91aaea3b /include
parent78eaa34a4816fd9a36e902adae4663f13bc39fab (diff)
parent2247841879faebe007ccade45d04027361d5d26c (diff)
downloadPROJ-175cbad0a7ca202cefff33f240100b01752f8f73.tar.gz
PROJ-175cbad0a7ca202cefff33f240100b01752f8f73.zip
Merge pull request #2065 from rouault/add_proj_get_units_from_database
Add proj_get_units_from_database() (fixes #2004)
Diffstat (limited to 'include')
-rw-r--r--include/proj/io.hpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/include/proj/io.hpp b/include/proj/io.hpp
index 3dcf7928..f07f78b8 100644
--- a/include/proj/io.hpp
+++ b/include/proj/io.hpp
@@ -1013,6 +1013,8 @@ class PROJ_GCC_DLL AuthorityFactory {
PROJ_DLL std::string getDescriptionText(const std::string &code) const;
+ // non-standard
+
/** CRS information */
struct CRSInfo {
/** Authority name */
@@ -1049,7 +1051,33 @@ class PROJ_GCC_DLL AuthorityFactory {
PROJ_DLL std::list<CRSInfo> getCRSInfoList() const;
- // non-standard
+ /** Unit information */
+ struct UnitInfo {
+ /** Authority name */
+ std::string authName;
+ /** Code */
+ std::string code;
+ /** Name */
+ std::string name;
+ /** Category: one of "linear", "linear_per_time", "angular",
+ * "angular_per_time", "scale", "scale_per_time" or "time" */
+ std::string category;
+ /** Conversion factor to the SI unit.
+ * It might be 0 in some cases to indicate no known conversion factor.
+ */
+ double convFactor;
+ /** PROJ short name (may be empty) */
+ std::string projShortName;
+ /** Whether the object is deprecated */
+ bool deprecated;
+
+ //! @cond Doxygen_Suppress
+ UnitInfo();
+ //! @endcond
+ };
+
+ PROJ_DLL std::list<UnitInfo> getUnitList() const;
+
PROJ_DLL static AuthorityFactoryNNPtr
create(const DatabaseContextNNPtr &context,
const std::string &authorityName);