diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-03-12 18:36:39 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-03-12 19:40:35 +0100 |
| commit | 35425763e70b70f7efc9a5c9616695369609553f (patch) | |
| tree | 57fb24d1983252490e8f01755c9fd3caf934643b /include/proj/io.hpp | |
| parent | ca3caf0e976e95a739963567057654cb8909bfb9 (diff) | |
| download | PROJ-35425763e70b70f7efc9a5c9616695369609553f.tar.gz PROJ-35425763e70b70f7efc9a5c9616695369609553f.zip | |
Add proj_get_units_from_database() (fixes #2004)
Diffstat (limited to 'include/proj/io.hpp')
| -rw-r--r-- | include/proj/io.hpp | 30 |
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); |
