From 078f1b4dc3fcb97249c22c8253b5da568b1ab227 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 2 Feb 2019 09:13:44 +0100 Subject: Export class for oss-fuzz --- include/proj/common.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/proj/common.hpp b/include/proj/common.hpp index ad8893f7..d0ecf5d6 100644 --- a/include/proj/common.hpp +++ b/include/proj/common.hpp @@ -366,7 +366,8 @@ using ObjectDomainNNPtr = util::nn; * * \remark Implements ObjectDomain from \ref ISO_19111_2018 */ -class ObjectDomain : public util::BaseObject, public util::IComparable { +class PROJ_GCC_DLL ObjectDomain : public util::BaseObject, + public util::IComparable { public: //! @cond Doxygen_Suppress PROJ_DLL ~ObjectDomain() override; @@ -420,7 +421,7 @@ using ObjectUsageNNPtr = util::nn; * * \remark Implements ObjectUsage from \ref ISO_19111_2018 */ -class ObjectUsage : public IdentifiedObject { +class PROJ_GCC_DLL ObjectUsage : public IdentifiedObject { public: //! @cond Doxygen_Suppress PROJ_DLL ~ObjectUsage() override; -- cgit v1.2.3 From 02efe72181814097284196de9b9b984db0fb3d26 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 6 Feb 2019 18:32:58 +0100 Subject: Add proj_get_crs_info_list_from_database() This method is intended to be used typically by GUI that lists all possible CRS. What is does could be done by previously existing functions, but it is much faster. It typically runs in less than 0.1s (hot run) versus ~0.5s with the method that consists in enumerating all codes and instanciating a PJ object for each of them. --- include/proj/io.hpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'include') diff --git a/include/proj/io.hpp b/include/proj/io.hpp index 4120d707..aedf0457 100644 --- a/include/proj/io.hpp +++ b/include/proj/io.hpp @@ -888,6 +888,38 @@ class PROJ_GCC_DLL AuthorityFactory { PROJ_DLL std::string getDescriptionText(const std::string &code) const; + /** CRS information */ + struct CRSInfo { + /** Authority name */ + std::string authName{}; + /** Code */ + std::string code{}; + /** Name */ + std::string name{}; + /** Type */ + ObjectType type{ObjectType::CRS}; + /** Whether the object is deprecated */ + bool deprecated{}; + /** Whereas the west_lon_degree, south_lat_degree, east_lon_degree and + * north_lat_degree fields are valid. */ + bool bbox_valid{}; + /** Western-most longitude of the area of use, in degrees. */ + double west_lon_degree{}; + /** Southern-most latitude of the area of use, in degrees. */ + double south_lat_degree{}; + /** Eastern-most longitude of the area of use, in degrees. */ + double east_lon_degree{}; + /** Northern-most latitude of the area of use, in degrees. */ + double north_lat_degree{}; + /** Name of the area of use. */ + std::string areaName{}; + /** Name of the projection method for a projected CRS. Might be empty + * even for projected CRS in some cases. */ + std::string projectionMethodName{}; + }; + + PROJ_DLL std::list getCRSInfoList() const; + // non-standard PROJ_DLL static AuthorityFactoryNNPtr create(const DatabaseContextNNPtr &context, -- cgit v1.2.3 From 5141b3908e59a26c9fe66de94bb7388bff741b58 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Mon, 11 Feb 2019 23:58:16 +0100 Subject: Make tmerc an alias for etmerc. (#1234) * Make tmerc an alias for etmerc This switches the algorithm used in tmerc to the Poder/Engsager tmerc algorithm. The original tmerc algorithm of Evenden/Snyder origin can still be accessed by adding the +approx flag when initializing a tmerc projection. The +approx flag can also be used when initializing UTM projections, in which case the Evenden/Snyder algorithm is used as well. If a tmerc projection is instantiated on a spherical earth the Evenden/Snyder algorithm is used as well since the Poder/Engsager algorithm is only defined on the ellipsoid. +proj=etmerc can still be instantiated for backwards compatibility reasons. Co-authored-by: Kristian Evers Co-authored-by: Even Rouault --- include/proj/io.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/proj/io.hpp b/include/proj/io.hpp index aedf0457..091efcb7 100644 --- a/include/proj/io.hpp +++ b/include/proj/io.hpp @@ -365,7 +365,7 @@ class PROJ_GCC_DLL PROJStringFormatter { PROJ_DLL ~PROJStringFormatter(); //! @endcond - PROJ_DLL void setUseETMercForTMerc(bool flag); + PROJ_DLL void setUseApproxTMerc(bool flag); PROJ_DLL const std::string &toString() const; @@ -378,7 +378,7 @@ class PROJ_GCC_DLL PROJStringFormatter { PROJ_DLL void startInversion(); PROJ_DLL void stopInversion(); PROJ_INTERNAL bool isInverted() const; - PROJ_INTERNAL bool getUseETMercForTMerc(bool &settingSetOut) const; + PROJ_INTERNAL bool getUseApproxTMerc() const; PROJ_INTERNAL void setCoordinateOperationOptimizations(bool enable); PROJ_DLL void -- cgit v1.2.3