From 70bc293a43def169fa34ed8e97a5cb06b336f247 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 20 Feb 2019 12:18:16 +0100 Subject: Vertical CRS transformation: synthetize a vertical unit change transformation when needed, and also sort Null geographic offset transformation in last --- include/proj/coordinateoperation.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/proj/coordinateoperation.hpp b/include/proj/coordinateoperation.hpp index 92b655f9..2f7c9bbf 100644 --- a/include/proj/coordinateoperation.hpp +++ b/include/proj/coordinateoperation.hpp @@ -1493,6 +1493,11 @@ class PROJ_GCC_DLL Transformation : public SingleOperation { PROJ_DLL TransformationNNPtr substitutePROJAlternativeGridNames( io::DatabaseContextNNPtr databaseContext) const; + PROJ_DLL static TransformationNNPtr createChangeVerticalUnit( + const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, + const crs::CRSNNPtr &targetCRSIn, const common::Scale &factor, + const std::vector &accuracies); + PROJ_PRIVATE : //! @cond Doxygen_Suppress PROJ_INTERNAL const std::string & -- cgit v1.2.3 From 94578ea8ff38f4bc6b1f6f52b80ecf7359f5dfc2 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 20 Feb 2019 18:04:35 +0100 Subject: CoordinateOperation: add a hasBallparkTransformation() method that can be used to know if it includes a very approximative transformation term --- include/proj/coordinateoperation.hpp | 3 +++ include/proj/internal/coordinateoperation_internal.hpp | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/proj/coordinateoperation.hpp b/include/proj/coordinateoperation.hpp index 2f7c9bbf..a0883cae 100644 --- a/include/proj/coordinateoperation.hpp +++ b/include/proj/coordinateoperation.hpp @@ -148,6 +148,8 @@ class PROJ_GCC_DLL CoordinateOperation : public common::ObjectUsage, PROJ_DLL bool isPROJInstanciable(const io::DatabaseContextPtr &databaseContext) const; + PROJ_DLL bool hasBallparkTransformation() const; + protected: PROJ_INTERNAL CoordinateOperation(); PROJ_INTERNAL CoordinateOperation(const CoordinateOperation &other); @@ -167,6 +169,7 @@ class PROJ_GCC_DLL CoordinateOperation : public common::ObjectUsage, PROJ_INTERNAL void setAccuracies( const std::vector &accuracies); + PROJ_INTERNAL void setHasBallparkTransformation(bool b); private: PROJ_OPAQUE_PRIVATE_DATA diff --git a/include/proj/internal/coordinateoperation_internal.hpp b/include/proj/internal/coordinateoperation_internal.hpp index 8428b8bf..65b786b2 100644 --- a/include/proj/internal/coordinateoperation_internal.hpp +++ b/include/proj/internal/coordinateoperation_internal.hpp @@ -246,7 +246,8 @@ class PROJBasedOperation : public SingleOperation { create(const util::PropertyMap &properties, const io::IPROJStringExportableNNPtr &projExportable, bool inverse, const crs::CRSNNPtr &sourceCRS, const crs::CRSNNPtr &targetCRS, - const std::vector &accuracies); + const std::vector &accuracies, + bool hasRoughTransformation); std::set gridsNeeded(const io::DatabaseContextPtr &databaseContext) const override; -- cgit v1.2.3 From 69ef7449f5f26453a8b6cab1ba02cb870055615f Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 20 Feb 2019 20:42:26 +0100 Subject: typo fixes: s/Explictly/Explicitly/ and s/instanciat/instantiat/ --- include/proj/coordinateoperation.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/proj/coordinateoperation.hpp b/include/proj/coordinateoperation.hpp index a0883cae..fd737dcc 100644 --- a/include/proj/coordinateoperation.hpp +++ b/include/proj/coordinateoperation.hpp @@ -146,7 +146,7 @@ class PROJ_GCC_DLL CoordinateOperation : public common::ObjectUsage, gridsNeeded(const io::DatabaseContextPtr &databaseContext) const = 0; PROJ_DLL bool - isPROJInstanciable(const io::DatabaseContextPtr &databaseContext) const; + isPROJInstantiable(const io::DatabaseContextPtr &databaseContext) const; PROJ_DLL bool hasBallparkTransformation() const; -- cgit v1.2.3 From 2f8bd934860b135044c5122e3272f7cc41ba81e7 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 26 Feb 2019 20:30:08 +0100 Subject: Rename internal constant to avoid conflict with macro in Solaris system headers --- include/proj/internal/io_internal.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/proj/internal/io_internal.hpp b/include/proj/internal/io_internal.hpp index be6a11bd..3b0e7c0f 100644 --- a/include/proj/internal/io_internal.hpp +++ b/include/proj/internal/io_internal.hpp @@ -76,7 +76,8 @@ class WKTConstants { static const std::string SCALEUNIT; static const std::string TIMEUNIT; static const std::string ELLIPSOID; - static const std::string CS; + // underscore, since there is a CS macro in Solaris system headers + static const std::string CS_; static const std::string ID; static const std::string PROJCRS; static const std::string BASEGEODCRS; -- cgit v1.2.3 From 1a2513badd1406ef061fd044273268a1e0ab3eed Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 1 Mar 2019 14:53:22 +0100 Subject: Doc: rename to ISO-19111:2019 And publish link to corresponding promoted and public OGC doc: http://docs.opengeospatial.org/as/18-005r4/18-005r4.html --- include/proj/common.hpp | 8 ++-- include/proj/coordinateoperation.hpp | 26 ++++++------- include/proj/coordinatesystem.hpp | 30 +++++++-------- include/proj/crs.hpp | 44 +++++++++++----------- include/proj/datum.hpp | 26 ++++++------- .../internal/coordinateoperation_constants.hpp | 2 +- .../proj/internal/coordinateoperation_internal.hpp | 2 +- .../proj/internal/coordinatesystem_internal.hpp | 2 +- include/proj/internal/internal.hpp | 2 +- include/proj/internal/io_internal.hpp | 2 +- include/proj/io.hpp | 2 +- include/proj/metadata.hpp | 4 +- include/proj/util.hpp | 2 +- 13 files changed, 76 insertions(+), 76 deletions(-) (limited to 'include') diff --git a/include/proj/common.hpp b/include/proj/common.hpp index d0ecf5d6..7940f4fc 100644 --- a/include/proj/common.hpp +++ b/include/proj/common.hpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: ISO19111:2018 implementation + * Purpose: ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** @@ -291,7 +291,7 @@ using IdentifiedObjectNNPtr = util::nn; /** \brief Abstract class representating a CRS-related object that has an * identification. * - * \remark Implements IdentifiedObject from \ref ISO_19111_2018 + * \remark Implements IdentifiedObject from \ref ISO_19111_2019 */ class PROJ_GCC_DLL IdentifiedObject : public util::BaseObject, public util::IComparable, @@ -364,7 +364,7 @@ using ObjectDomainNNPtr = util::nn; /** \brief The scope and validity of a CRS-related object. * - * \remark Implements ObjectDomain from \ref ISO_19111_2018 + * \remark Implements ObjectDomain from \ref ISO_19111_2019 */ class PROJ_GCC_DLL ObjectDomain : public util::BaseObject, public util::IComparable { @@ -419,7 +419,7 @@ using ObjectUsageNNPtr = util::nn; /** \brief Abstract class of a CRS-related object that has usages. * - * \remark Implements ObjectUsage from \ref ISO_19111_2018 + * \remark Implements ObjectUsage from \ref ISO_19111_2019 */ class PROJ_GCC_DLL ObjectUsage : public IdentifiedObject { public: diff --git a/include/proj/coordinateoperation.hpp b/include/proj/coordinateoperation.hpp index fd737dcc..ce8021a0 100644 --- a/include/proj/coordinateoperation.hpp +++ b/include/proj/coordinateoperation.hpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: ISO19111:2018 implementation + * Purpose: ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** @@ -113,7 +113,7 @@ using CoordinateOperationNNPtr = util::nn; * (some) entirely different parameter values are needed, a different coordinate * operation shall be defined. * - * \remark Implements CoordinateOperation from \ref ISO_19111_2018 + * \remark Implements CoordinateOperation from \ref ISO_19111_2019 */ class PROJ_GCC_DLL CoordinateOperation : public common::ObjectUsage, public io::IPROJStringExportable { @@ -181,7 +181,7 @@ class PROJ_GCC_DLL CoordinateOperation : public common::ObjectUsage, /** \brief Abstract class modelling a parameter value (OperationParameter) * or group of parameters. * - * \remark Implements GeneralOperationParameter from \ref ISO_19111_2018 + * \remark Implements GeneralOperationParameter from \ref ISO_19111_2019 */ class PROJ_GCC_DLL GeneralOperationParameter : public common::IdentifiedObject { public: @@ -225,7 +225,7 @@ using OperationParameterNNPtr = util::nn; * Most parameter values are numeric, but other types of parameter values are * possible. * - * \remark Implements OperationParameter from \ref ISO_19111_2018 + * \remark Implements OperationParameter from \ref ISO_19111_2019 */ class PROJ_GCC_DLL OperationParameter final : public GeneralOperationParameter { public: @@ -271,7 +271,7 @@ struct MethodMapping; /** \brief Abstract class modelling a parameter value (OperationParameterValue) * or group of parameter values. * - * \remark Implements GeneralParameterValue from \ref ISO_19111_2018 + * \remark Implements GeneralParameterValue from \ref ISO_19111_2019 */ class PROJ_GCC_DLL GeneralParameterValue : public util::BaseObject, public io::IWKTExportable, @@ -325,7 +325,7 @@ using ParameterValueNNPtr = util::nn; * Most parameter values are numeric, but other types of parameter values are * possible. * - * \remark Implements ParameterValue from \ref ISO_19111_2018 + * \remark Implements ParameterValue from \ref ISO_19111_2019 */ class PROJ_GCC_DLL ParameterValue final : public util::BaseObject, public io::IWKTExportable, @@ -400,7 +400,7 @@ using OperationParameterValueNNPtr = util::nn; * * This combines a OperationParameter with the corresponding ParameterValue. * - * \remark Implements OperationParameterValue from \ref ISO_19111_2018 + * \remark Implements OperationParameterValue from \ref ISO_19111_2019 */ class PROJ_GCC_DLL OperationParameterValue final : public GeneralParameterValue { @@ -463,7 +463,7 @@ using OperationMethodNNPtr = util::nn; * For a projection method, this contains the name of the projection method * and the name of the projection parameters. * - * \remark Implements OperationMethod from \ref ISO_19111_2018 + * \remark Implements OperationMethod from \ref ISO_19111_2019 */ class PROJ_GCC_DLL OperationMethod : public common::IdentifiedObject { public: @@ -534,7 +534,7 @@ using SingleOperationNNPtr = util::nn; /** \brief A single (not concatenated) coordinate operation * (CoordinateOperation) * - * \remark Implements SingleOperation from \ref ISO_19111_2018 + * \remark Implements SingleOperation from \ref ISO_19111_2019 */ class PROJ_GCC_DLL SingleOperation : virtual public CoordinateOperation { public: @@ -633,7 +633,7 @@ using ConversionNNPtr = util::nn; * associations, but through associations from crs::DerivedCRS to * crs::SingleCRS. * - * \remark Implements Conversion from \ref ISO_19111_2018 + * \remark Implements Conversion from \ref ISO_19111_2019 */ /*! @@ -1353,7 +1353,7 @@ using TransformationNNPtr = util::nn; * coordinates are referenced to different datums (reference frames) will be a * coordinate transformation. * - * \remark Implements Transformation from \ref ISO_19111_2018 + * \remark Implements Transformation from \ref ISO_19111_2019 */ class PROJ_GCC_DLL Transformation : public SingleOperation { public: @@ -1553,7 +1553,7 @@ using PointMotionOperationNNPtr = util::nn; * * The motion is due to tectonic plate movement or deformation. * - * \remark Implements PointMotionOperation from \ref ISO_19111_2018 + * \remark Implements PointMotionOperation from \ref ISO_19111_2019 */ class PROJ_GCC_DLL PointMotionOperation : public SingleOperation { public: @@ -1582,7 +1582,7 @@ using ConcatenatedOperationNNPtr = util::nn; * the source coordinate reference system of step n+1 shall be the same as * the target coordinate reference system of step n. * - * \remark Implements ConcatenatedOperation from \ref ISO_19111_2018 + * \remark Implements ConcatenatedOperation from \ref ISO_19111_2019 */ class PROJ_GCC_DLL ConcatenatedOperation final : public CoordinateOperation { public: diff --git a/include/proj/coordinatesystem.hpp b/include/proj/coordinatesystem.hpp index 9216bf33..ea1c1f99 100644 --- a/include/proj/coordinatesystem.hpp +++ b/include/proj/coordinatesystem.hpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: ISO19111:2018 implementation + * Purpose: ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** @@ -51,7 +51,7 @@ namespace cs { /** \brief The direction of positive increase in the coordinate value for a * coordinate system axis. * - * \remark Implements AxisDirection from \ref ISO_19111_2018 + * \remark Implements AxisDirection from \ref ISO_19111_2019 */ class AxisDirection : public util::CodeList { public: @@ -119,7 +119,7 @@ using MeridianNNPtr = util::nn; /** \brief The meridian that the axis follows from the pole, for a coordinate * reference system centered on a pole. * - * \note There is no modelling for this concept in \ref ISO_19111_2018 + * \note There is no modelling for this concept in \ref ISO_19111_2019 * * \remark Implements MERIDIAN from \ref WKT2 */ @@ -163,7 +163,7 @@ using CoordinateSystemAxisNNPtr = util::nn; /** \brief The definition of a coordinate system axis. * - * \remark Implements CoordinateSystemAxis from \ref ISO_19111_2018 + * \remark Implements CoordinateSystemAxis from \ref ISO_19111_2019 */ class PROJ_GCC_DLL CoordinateSystemAxis final : public common::IdentifiedObject { @@ -233,7 +233,7 @@ class PROJ_GCC_DLL CoordinateSystemAxis final * The coordinate values in a coordinate tuple shall be recorded in the order * in which the coordinate system axes associations are recorded. * - * \remark Implements CoordinateSystem from \ref ISO_19111_2018 + * \remark Implements CoordinateSystem from \ref ISO_19111_2019 */ class PROJ_GCC_DLL CoordinateSystem : public common::IdentifiedObject { public: @@ -289,7 +289,7 @@ using SphericalCSNNPtr = util::nn; * ellipsoid "degenerated" into a sphere. A SphericalCS shall have three * axis associations. * - * \remark Implements SphericalCS from \ref ISO_19111_2018 + * \remark Implements SphericalCS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL SphericalCS final : public CoordinateSystem { public: @@ -332,7 +332,7 @@ using EllipsoidalCSNNPtr = util::nn; * * An EllipsoidalCS shall have two or three associations. * - * \remark Implements EllipsoidalCS from \ref ISO_19111_2018 + * \remark Implements EllipsoidalCS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL EllipsoidalCS final : public CoordinateSystem { public: @@ -411,7 +411,7 @@ using VerticalCSNNPtr = util::nn; * Such a coordinate system is usually dependent on the Earth's gravity field. * A VerticalCS shall have one axis association. * - * \remark Implements VerticalCS from \ref ISO_19111_2018 + * \remark Implements VerticalCS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL VerticalCS final : public CoordinateSystem { public: @@ -460,7 +460,7 @@ using CartesianCSNNPtr = util::nn; * three axis associations; the number of associations shall equal the * dimension of the CS. * - * \remark Implements CartesianCS from \ref ISO_19111_2018 + * \remark Implements CartesianCS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL CartesianCS final : public CoordinateSystem { public: @@ -529,7 +529,7 @@ using OrdinalCSNNPtr = util::nn; * The number of associations shall equal the * dimension of the CS. * - * \remark Implements OrdinalCS from \ref ISO_19111_2018 + * \remark Implements OrdinalCS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL OrdinalCS final : public CoordinateSystem { public: @@ -565,7 +565,7 @@ using ParametricCSNNPtr = util::nn; /** \brief one-dimensional coordinate reference system which uses parameter * values or functions that may vary monotonically with height. * - * \remark Implements ParametricCS from \ref ISO_19111_2018 + * \remark Implements ParametricCS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL ParametricCS final : public CoordinateSystem { public: @@ -603,7 +603,7 @@ using TemporalCSNNPtr = util::nn; * * A TemporalCS shall have one axis association. * - * \remark Implements TemporalCS from \ref ISO_19111_2018 + * \remark Implements TemporalCS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL TemporalCS : public CoordinateSystem { public: @@ -637,7 +637,7 @@ using DateTimeTemporalCSNNPtr = util::nn; * axisUnitID; the temporal quantities are defined through the ISO 8601 * representation. * - * \remark Implements DateTimeTemporalCS from \ref ISO_19111_2018 + * \remark Implements DateTimeTemporalCS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL DateTimeTemporalCS final : public TemporalCS { public: @@ -673,7 +673,7 @@ using TemporalCountCSNNPtr = util::nn; * * A TemporalCountCS shall have one axis association. * - * \remark Implements TemporalCountCS from \ref ISO_19111_2018 + * \remark Implements TemporalCountCS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL TemporalCountCS final : public TemporalCS { public: @@ -709,7 +709,7 @@ using TemporalMeasureCSNNPtr = util::nn; * * A TemporalMeasureCS shall have one axis association. * - * \remark Implements TemporalMeasureCS from \ref ISO_19111_2018 + * \remark Implements TemporalMeasureCS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL TemporalMeasureCS final : public TemporalCS { public: diff --git a/include/proj/crs.hpp b/include/proj/crs.hpp index fb34d3b7..33038683 100644 --- a/include/proj/crs.hpp +++ b/include/proj/crs.hpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: ISO19111:2018 implementation + * Purpose: ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** @@ -79,7 +79,7 @@ using CRSNNPtr = util::nn; /** \brief Abstract class modelling a coordinate reference system which is * usually single but may be compound. * - * \remark Implements CRS from \ref ISO_19111_2018 + * \remark Implements CRS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL CRS : public common::ObjectUsage { public: @@ -149,7 +149,7 @@ class PROJ_GCC_DLL CRS : public common::ObjectUsage { * one Coordinate System and either one datum::Datum or one * datum::DatumEnsemble. * - * \remark Implements SingleCRS from \ref ISO_19111_2018 + * \remark Implements SingleCRS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL SingleCRS : public CRS { public: @@ -204,7 +204,7 @@ using GeodeticCRSNNPtr = util::nn; * association to a velocity model then the geodetic CRS is dynamic, else it * is static. * - * \remark Implements GeodeticCRS from \ref ISO_19111_2018 + * \remark Implements GeodeticCRS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL GeodeticCRS : virtual public SingleCRS, public io::IPROJStringExportable { @@ -312,7 +312,7 @@ class PROJ_GCC_DLL GeodeticCRS : virtual public SingleCRS, * association to a velocity model then the geodetic CRS is dynamic, else it is * static. * - * \remark Implements GeographicCRS from \ref ISO_19111_2018 + * \remark Implements GeographicCRS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL GeographicCRS : public GeodeticCRS { public: @@ -398,7 +398,7 @@ class PROJ_GCC_DLL GeographicCRS : public GeodeticCRS { * reference system. They exist only as an inseparable part of a 3D coordinate * tuple defined in a geographic 3D coordinate reference system. * - * \remark Implements VerticalCRS from \ref ISO_19111_2018 + * \remark Implements VerticalCRS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL VerticalCRS : virtual public SingleCRS, public io::IPROJStringExportable { @@ -476,7 +476,7 @@ class PROJ_GCC_DLL VerticalCRS : virtual public SingleCRS, * coordinate reference system is implemented using the parameters and * formula(s) specified in the definition of the coordinate conversion. * - * \remark Implements DerivedCRS from \ref ISO_19111_2018 + * \remark Implements DerivedCRS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL DerivedCRS : virtual public SingleCRS { public: @@ -539,7 +539,7 @@ using ProjectedCRSNNPtr = util::nn; * height is passed through unchanged and forms the vertical axis of the * projected CRS's Cartesian coordinate system. * - * \remark Implements ProjectedCRS from \ref ISO_19111_2018 + * \remark Implements ProjectedCRS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL ProjectedCRS final : public DerivedCRS, public io::IPROJStringExportable { @@ -612,7 +612,7 @@ using TemporalCRSNNPtr = util::nn; /** \brief A coordinate reference system associated with a temporal datum and a * one-dimensional temporal coordinate system. * - * \remark Implements TemporalCRS from \ref ISO_19111_2018 + * \remark Implements TemporalCRS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL TemporalCRS : virtual public SingleCRS { public: @@ -671,7 +671,7 @@ using EngineeringCRSNNPtr = util::nn; * In \ref WKT2, it maps to a ENGINEERINGCRS / ENGCRS keyword. In \ref WKT1, * it maps to a LOCAL_CS keyword. * - * \remark Implements EngineeringCRS from \ref ISO_19111_2018 + * \remark Implements EngineeringCRS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL EngineeringCRS : virtual public SingleCRS { public: @@ -725,7 +725,7 @@ using ParametricCRSNNPtr = util::nn; * without geodetic corrections, or on moving platforms such as road vehicles * vessels, aircraft or spacecraft, or as the internal CRS of an image. * - * \remark Implements ParametricCRS from \ref ISO_19111_2018 + * \remark Implements ParametricCRS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL ParametricCRS : virtual public SingleCRS { public: @@ -781,11 +781,11 @@ using CompoundCRSNNPtr = util::nn; * if coordinate values in one cannot be converted or transformed into * coordinate values in the other. * - * \note As a departure to \ref ISO_19111_2018, we allow to build a CompoundCRS - * from CRS objects, whereas ISO19111:2018 restricts the components to + * \note As a departure to \ref ISO_19111_2019, we allow to build a CompoundCRS + * from CRS objects, whereas ISO19111:2019 restricts the components to * SingleCRS. * - * \remark Implements CompoundCRS from \ref ISO_19111_2018 + * \remark Implements CompoundCRS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL CompoundCRS final : public CRS, public io::IPROJStringExportable { @@ -857,7 +857,7 @@ class PROJ_GCC_DLL CompoundCRS final : public CRS, * present in \ref WKT1. * * \note Contrary to other CRS classes of this package, there is no - * \ref ISO_19111_2018 modelling of a BoundCRS. + * \ref ISO_19111_2019 modelling of a BoundCRS. * * \remark Implements BoundCRS from \ref WKT2 */ @@ -935,7 +935,7 @@ using DerivedGeodeticCRSNNPtr = util::nn; * inheriting a geodetic reference frame, and associated with a 3D Cartesian * or spherical coordinate system. * - * \remark Implements DerivedGeodeticCRS from \ref ISO_19111_2018 + * \remark Implements DerivedGeodeticCRS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL DerivedGeodeticCRS final : public GeodeticCRS, public DerivedCRS { @@ -1010,7 +1010,7 @@ using DerivedGeographicCRSNNPtr = util::nn; * A derived geographic CRS can be based on a geodetic CRS only if that * geodetic CRS definition includes an ellipsoid. * - * \remark Implements DerivedGeographicCRS from \ref ISO_19111_2018 + * \remark Implements DerivedGeographicCRS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL DerivedGeographicCRS final : public GeographicCRS, public DerivedCRS { @@ -1075,7 +1075,7 @@ using DerivedProjectedCRSNNPtr = util::nn; * * A DerivedProjectedCRS is not a ProjectedCRS. * - * \remark Implements DerivedProjectedCRS from \ref ISO_19111_2018 + * \remark Implements DerivedProjectedCRS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL DerivedProjectedCRS final : public DerivedCRS { public: @@ -1129,7 +1129,7 @@ using DerivedVerticalCRSNNPtr = util::nn; * coordinate reference system as its base CRS, thereby inheriting a vertical * reference frame, and a vertical coordinate system. * - * \remark Implements DerivedVerticalCRS from \ref ISO_19111_2018 + * \remark Implements DerivedVerticalCRS from \ref ISO_19111_2019 */ class PROJ_GCC_DLL DerivedVerticalCRS final : public VerticalCRS, public DerivedCRS { @@ -1275,7 +1275,7 @@ struct PROJ_GCC_DLL DerivedEngineeringCRSTraits { * engineering datum, and is associated with one of the coordinate system * types for an EngineeringCRS * - * \remark Implements DerivedEngineeringCRS from \ref ISO_19111_2018 + * \remark Implements DerivedEngineeringCRS from \ref ISO_19111_2019 */ #ifdef DOXYGEN_ENABLED class DerivedEngineeringCRS @@ -1312,7 +1312,7 @@ struct PROJ_GCC_DLL DerivedParametricCRSTraits { * coordinate reference system as its base CRS, thereby inheriting a parametric * datum, and a parametric coordinate system. * - * \remark Implements DerivedParametricCRS from \ref ISO_19111_2018 + * \remark Implements DerivedParametricCRS from \ref ISO_19111_2019 */ #ifdef DOXYGEN_ENABLED class DerivedParametricCRS @@ -1349,7 +1349,7 @@ struct PROJ_GCC_DLL DerivedTemporalCRSTraits { * coordinate reference system as its base CRS, thereby inheriting a temporal * datum, and a temporal coordinate system. * - * \remark Implements DerivedTemporalCRS from \ref ISO_19111_2018 + * \remark Implements DerivedTemporalCRS from \ref ISO_19111_2019 */ #ifdef DOXYGEN_ENABLED class DerivedTemporalCRS : public DerivedCRSTemplate { diff --git a/include/proj/datum.hpp b/include/proj/datum.hpp index 17c4c2c1..b7416497 100644 --- a/include/proj/datum.hpp +++ b/include/proj/datum.hpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: ISO19111:2018 implementation + * Purpose: ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** @@ -59,7 +59,7 @@ namespace datum { * subtype can be associated with only specific types of coordinate reference * systems. * - * \remark Implements Datum from \ref ISO_19111_2018 + * \remark Implements Datum from \ref ISO_19111_2019 */ class PROJ_GCC_DLL Datum : public common::ObjectUsage { public: @@ -115,7 +115,7 @@ using DatumEnsembleNNPtr = util::nn; * Every frame within the datum ensemble must be a realizations of the same * Terrestrial Reference System or Vertical Reference System. * - * \remark Implements DatumEnsemble from \ref ISO_19111_2018 + * \remark Implements DatumEnsemble from \ref ISO_19111_2019 */ class PROJ_GCC_DLL DatumEnsemble final : public common::IdentifiedObject { public: @@ -168,7 +168,7 @@ using PrimeMeridianNNPtr = util::nn; * \note The default value for prime meridian name is "Greenwich". When the * default applies, the value for the longitude shall be 0 (degrees). * - * \remark Implements PrimeMeridian from \ref ISO_19111_2018 + * \remark Implements PrimeMeridian from \ref ISO_19111_2019 */ class PROJ_GCC_DLL PrimeMeridian final : public common::IdentifiedObject, public io::IPROJStringExportable { @@ -240,7 +240,7 @@ using EllipsoidNNPtr = util::nn; * For the Earth an oblate biaxial ellipsoid is used: in mathematical terms, * it is a surface formed by the rotation of an ellipse about its minor axis. * - * \remark Implements Ellipsoid from \ref ISO_19111_2018 + * \remark Implements Ellipsoid from \ref ISO_19111_2019 */ class PROJ_GCC_DLL Ellipsoid final : public common::IdentifiedObject, public io::IPROJStringExportable { @@ -369,7 +369,7 @@ using GeodeticReferenceFrameNNPtr = util::nn; * * \note In \ref ISO_19111_2007, this class was called GeodeticDatum. * - * \remark Implements GeodeticReferenceFrame from \ref ISO_19111_2018 + * \remark Implements GeodeticReferenceFrame from \ref ISO_19111_2019 */ class PROJ_GCC_DLL GeodeticReferenceFrame : public Datum { public: @@ -443,7 +443,7 @@ using DynamicGeodeticReferenceFrameNNPtr = * For example defining station coordinates having linear velocities to account * for crustal motion. * - * \remark Implements DynamicGeodeticReferenceFrame from \ref ISO_19111_2018 + * \remark Implements DynamicGeodeticReferenceFrame from \ref ISO_19111_2019 */ class PROJ_GCC_DLL DynamicGeodeticReferenceFrame final : public GeodeticReferenceFrame { @@ -498,7 +498,7 @@ class PROJ_GCC_DLL DynamicGeodeticReferenceFrame final /** \brief The specification of the method by which the vertical reference frame * is realized. * - * \remark Implements RealizationMethod from \ref ISO_19111_2018 + * \remark Implements RealizationMethod from \ref ISO_19111_2019 */ class PROJ_GCC_DLL RealizationMethod : public util::CodeList { public: @@ -528,7 +528,7 @@ using VerticalReferenceFrameNNPtr = util::nn; * * \note In \ref ISO_19111_2007, this class was called VerticalDatum. - * \remark Implements VerticalReferenceFrame from \ref ISO_19111_2018 + * \remark Implements VerticalReferenceFrame from \ref ISO_19111_2019 */ class PROJ_GCC_DLL VerticalReferenceFrame : public Datum { public: @@ -585,7 +585,7 @@ using DynamicVerticalReferenceFrameNNPtr = * For example defining station heights have velocity to account for * post-glacial isostatic rebound motion. * - * \remark Implements DynamicVerticalReferenceFrame from \ref ISO_19111_2018 + * \remark Implements DynamicVerticalReferenceFrame from \ref ISO_19111_2019 */ class PROJ_GCC_DLL DynamicVerticalReferenceFrame final : public VerticalReferenceFrame { @@ -645,7 +645,7 @@ using TemporalDatumNNPtr = util::nn; /** \brief The definition of the relationship of a temporal coordinate system * to an object. The object is normally time on the Earth. * - * \remark Implements TemporalDatum from \ref ISO_19111_2018 + * \remark Implements TemporalDatum from \ref ISO_19111_2019 */ class PROJ_GCC_DLL TemporalDatum final : public Datum { public: @@ -698,7 +698,7 @@ using EngineeringDatumNNPtr = util::nn; * point at a construction site), or be a defined point on a moving vehicle * (such as on a ship or satellite), or a defined point of an image. * - * \remark Implements EngineeringDatum from \ref ISO_19111_2018 + * \remark Implements EngineeringDatum from \ref ISO_19111_2019 */ class PROJ_GCC_DLL EngineeringDatum final : public Datum { public: @@ -742,7 +742,7 @@ using ParametricDatumNNPtr = util::nn; * particular reference surface used as the origin of a parametric coordinate * system, including its position with respect to the Earth. * - * \remark Implements ParametricDatum from \ref ISO_19111_2018 + * \remark Implements ParametricDatum from \ref ISO_19111_2019 */ class PROJ_GCC_DLL ParametricDatum final : public Datum { public: diff --git a/include/proj/internal/coordinateoperation_constants.hpp b/include/proj/internal/coordinateoperation_constants.hpp index accb4a1e..9d65dab8 100644 --- a/include/proj/internal/coordinateoperation_constants.hpp +++ b/include/proj/internal/coordinateoperation_constants.hpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: ISO19111:2018 implementation + * Purpose: ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** diff --git a/include/proj/internal/coordinateoperation_internal.hpp b/include/proj/internal/coordinateoperation_internal.hpp index 65b786b2..3dbb8e0b 100644 --- a/include/proj/internal/coordinateoperation_internal.hpp +++ b/include/proj/internal/coordinateoperation_internal.hpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: ISO19111:2018 implementation + * Purpose: ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** diff --git a/include/proj/internal/coordinatesystem_internal.hpp b/include/proj/internal/coordinatesystem_internal.hpp index 63c5f7af..ccef2e7d 100644 --- a/include/proj/internal/coordinatesystem_internal.hpp +++ b/include/proj/internal/coordinatesystem_internal.hpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: ISO19111:2018 implementation + * Purpose: ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** diff --git a/include/proj/internal/internal.hpp b/include/proj/internal/internal.hpp index b16e12bc..84fc1c2b 100644 --- a/include/proj/internal/internal.hpp +++ b/include/proj/internal/internal.hpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: ISO19111:2018 implementation + * Purpose: ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** diff --git a/include/proj/internal/io_internal.hpp b/include/proj/internal/io_internal.hpp index 3b0e7c0f..403698db 100644 --- a/include/proj/internal/io_internal.hpp +++ b/include/proj/internal/io_internal.hpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: ISO19111:2018 implementation + * Purpose: ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** diff --git a/include/proj/io.hpp b/include/proj/io.hpp index 091efcb7..de1c1d1b 100644 --- a/include/proj/io.hpp +++ b/include/proj/io.hpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: ISO19111:2018 implementation + * Purpose: ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** diff --git a/include/proj/metadata.hpp b/include/proj/metadata.hpp index 02873c81..d32996fb 100644 --- a/include/proj/metadata.hpp +++ b/include/proj/metadata.hpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: ISO19111:2018 implementation + * Purpose: ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** @@ -357,7 +357,7 @@ using IdentifierNNPtr = util::nn; /** \brief Value uniquely identifying an object within a namespace. * - * \remark Implements Identifier as described in \ref ISO_19111_2018 but which + * \remark Implements Identifier as described in \ref ISO_19111_2019 but which * originates from \ref ISO_19115 */ class PROJ_GCC_DLL Identifier : public util::BaseObject, diff --git a/include/proj/util.hpp b/include/proj/util.hpp index 30985ec8..9425c3a3 100644 --- a/include/proj/util.hpp +++ b/include/proj/util.hpp @@ -1,7 +1,7 @@ /****************************************************************************** * * Project: PROJ - * Purpose: ISO19111:2018 implementation + * Purpose: ISO19111:2019 implementation * Author: Even Rouault * ****************************************************************************** -- cgit v1.2.3 From 688b4adb37c2303bde0a31718fc8a8b1fe85ab43 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 1 Mar 2019 21:42:40 +0100 Subject: Reformat to avoid error on PDF generation (fixes #1304) --- include/proj/coordinateoperation.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/proj/coordinateoperation.hpp b/include/proj/coordinateoperation.hpp index ce8021a0..0ff27203 100644 --- a/include/proj/coordinateoperation.hpp +++ b/include/proj/coordinateoperation.hpp @@ -69,8 +69,8 @@ struct GridDescription { std::string url{}; /**< Grid URL (if packageName is empty), or package URL (or empty) */ bool directDownload = false; /**< Whether url can be fetched directly. */ - bool openLicense = - false; /**< Whether the grid is released with an open license. */ + /** Whether the grid is released with an open license. */ + bool openLicense = false; bool available = false; /**< Whether GRID is available. */ //! @cond Doxygen_Suppress -- cgit v1.2.3 From a1cc9977decb62b4576c6c7f17a0d64cab9bf36a Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 16 Mar 2019 11:03:07 +0100 Subject: Fix doc generation with Breathe 4.12.0 Breathe 4.12.0 (as pulled by MacOSX builds such as https://travis-ci.com/OSGeo/proj.4/jobs/185395222) does not seem to like default initialization in documented C++ structs (regression/bug) /Users/travis/build/OSGeo/proj.4/docs/source/development/reference/cpp/io.rst:6:Parsing of expression failed. Using fallback parser. Error was: Error in postfix expression, expected primary expression or type. If primary expression: Invalid definition: Expected identifier in nested name. [error at 67] std::string osgeo::proj::io::AuthorityFactory::CRSInfo::authName = {} -------------------------------------------------------------------^ If type: Invalid definition: Expected identifier in nested name. [error at 67] std::string osgeo::proj::io::AuthorityFactory::CRSInfo::authName = {} -------------------------------------------------------------------^ --- include/proj/coordinateoperation.hpp | 14 +++++++------- include/proj/io.hpp | 28 ++++++++++++++++------------ 2 files changed, 23 insertions(+), 19 deletions(-) (limited to 'include') diff --git a/include/proj/coordinateoperation.hpp b/include/proj/coordinateoperation.hpp index 0ff27203..3111a2a3 100644 --- a/include/proj/coordinateoperation.hpp +++ b/include/proj/coordinateoperation.hpp @@ -63,15 +63,15 @@ namespace operation { /** \brief Grid description */ struct GridDescription { - std::string shortName{}; /**< Grid short filename */ - std::string fullName{}; /**< Grid full path name (if found) */ - std::string packageName{}; /**< Package name (or empty) */ - std::string url{}; /**< Grid URL (if packageName is empty), or package + std::string shortName; /**< Grid short filename */ + std::string fullName; /**< Grid full path name (if found) */ + std::string packageName; /**< Package name (or empty) */ + std::string url; /**< Grid URL (if packageName is empty), or package URL (or empty) */ - bool directDownload = false; /**< Whether url can be fetched directly. */ + bool directDownload; /**< Whether url can be fetched directly. */ /** Whether the grid is released with an open license. */ - bool openLicense = false; - bool available = false; /**< Whether GRID is available. */ + bool openLicense; + bool available; /**< Whether GRID is available. */ //! @cond Doxygen_Suppress bool operator<(const GridDescription &other) const { diff --git a/include/proj/io.hpp b/include/proj/io.hpp index de1c1d1b..2fef0f9c 100644 --- a/include/proj/io.hpp +++ b/include/proj/io.hpp @@ -891,31 +891,35 @@ class PROJ_GCC_DLL AuthorityFactory { /** CRS information */ struct CRSInfo { /** Authority name */ - std::string authName{}; + std::string authName; /** Code */ - std::string code{}; + std::string code; /** Name */ - std::string name{}; + std::string name; /** Type */ - ObjectType type{ObjectType::CRS}; + ObjectType type; /** Whether the object is deprecated */ - bool deprecated{}; + bool deprecated; /** Whereas the west_lon_degree, south_lat_degree, east_lon_degree and * north_lat_degree fields are valid. */ - bool bbox_valid{}; + bool bbox_valid; /** Western-most longitude of the area of use, in degrees. */ - double west_lon_degree{}; + double west_lon_degree; /** Southern-most latitude of the area of use, in degrees. */ - double south_lat_degree{}; + double south_lat_degree; /** Eastern-most longitude of the area of use, in degrees. */ - double east_lon_degree{}; + double east_lon_degree; /** Northern-most latitude of the area of use, in degrees. */ - double north_lat_degree{}; + double north_lat_degree; /** Name of the area of use. */ - std::string areaName{}; + 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{}; + std::string projectionMethodName; + + //! @cond Doxygen_Suppress + CRSInfo(); + //! @endcond }; PROJ_DLL std::list getCRSInfoList() const; -- cgit v1.2.3 From a9886a5e4a64610aa605e98afeb467d1c44ed925 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 16 Mar 2019 13:31:09 +0100 Subject: Run scripts/reformat_cpp.sh --- include/proj/coordinateoperation.hpp | 6 +++--- include/proj/crs.hpp | 28 ++++++++++++++-------------- include/proj/io.hpp | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) (limited to 'include') diff --git a/include/proj/coordinateoperation.hpp b/include/proj/coordinateoperation.hpp index 3111a2a3..af1c293f 100644 --- a/include/proj/coordinateoperation.hpp +++ b/include/proj/coordinateoperation.hpp @@ -66,9 +66,9 @@ struct GridDescription { std::string shortName; /**< Grid short filename */ std::string fullName; /**< Grid full path name (if found) */ std::string packageName; /**< Package name (or empty) */ - std::string url; /**< Grid URL (if packageName is empty), or package - URL (or empty) */ - bool directDownload; /**< Whether url can be fetched directly. */ + std::string url; /**< Grid URL (if packageName is empty), or package + URL (or empty) */ + bool directDownload; /**< Whether url can be fetched directly. */ /** Whether the grid is released with an open license. */ bool openLicense; bool available; /**< Whether GRID is available. */ diff --git a/include/proj/crs.hpp b/include/proj/crs.hpp index 33038683..b9594165 100644 --- a/include/proj/crs.hpp +++ b/include/proj/crs.hpp @@ -1205,23 +1205,23 @@ class PROJ_GCC_DLL DerivedCRSTemplate final : public DerivedCRSTraits::BaseType, typedef util::nn> CSNNPtr; /** \brief Return the base CRS of a DerivedCRSTemplate. - * - * @return the base CRS. - */ + * + * @return the base CRS. + */ PROJ_DLL const BaseNNPtr baseCRS() const; /** \brief Instantiate a DerivedCRSTemplate from a base CRS, a deriving - * conversion and a cs::CoordinateSystem. - * - * @param properties See \ref general_properties. - * At minimum the name should be defined. - * @param baseCRSIn base CRS. - * @param derivingConversionIn the deriving conversion from the base CRS to - * this - * CRS. - * @param csIn the coordinate system. - * @return new DerivedCRSTemplate. - */ + * conversion and a cs::CoordinateSystem. + * + * @param properties See \ref general_properties. + * At minimum the name should be defined. + * @param baseCRSIn base CRS. + * @param derivingConversionIn the deriving conversion from the base CRS to + * this + * CRS. + * @param csIn the coordinate system. + * @return new DerivedCRSTemplate. + */ PROJ_DLL static NNPtr create(const util::PropertyMap &properties, const BaseNNPtr &baseCRSIn, const operation::ConversionNNPtr &derivingConversionIn, diff --git a/include/proj/io.hpp b/include/proj/io.hpp index 2fef0f9c..8cf8e3c4 100644 --- a/include/proj/io.hpp +++ b/include/proj/io.hpp @@ -901,7 +901,7 @@ class PROJ_GCC_DLL AuthorityFactory { /** 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. */ + * north_lat_degree fields are valid. */ bool bbox_valid; /** Western-most longitude of the area of use, in degrees. */ double west_lon_degree; -- cgit v1.2.3 From e1350cac43d5a9854207af3fb318a74be7fcd12f Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 17 Mar 2019 19:16:04 +0100 Subject: Fix some issues raised by latest cppcheck - coordinateoperation_internal.hpp: missing 'explicit' keyword - proj.cpp: unused 'generic' member in enumeration - init.cpp: useless assignment to a_orig and es_orig, because done again a few lines below. - crs.cpp: unused variable - datum.cpp: inefficient use of find() function - io.cpp: * missing 'static' qualifier for method * useles ternary test (left and right have same value) - aeqd.cpp: useless assignment of inv and fwd, snice done again a few lines below - isea.cpp: useless assignment of resolution and aperture since done again a few lines below, and with default values when params are absent - mod_ster.cpp: useless assignment of lp.lam, overriden in below code paths. - stere.cpp: false positive, but better not modify another variable than the iterator in a for() loop. --- include/proj/internal/coordinateoperation_internal.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/proj/internal/coordinateoperation_internal.hpp b/include/proj/internal/coordinateoperation_internal.hpp index 3dbb8e0b..680e805e 100644 --- a/include/proj/internal/coordinateoperation_internal.hpp +++ b/include/proj/internal/coordinateoperation_internal.hpp @@ -253,7 +253,7 @@ class PROJBasedOperation : public SingleOperation { gridsNeeded(const io::DatabaseContextPtr &databaseContext) const override; protected: - PROJBasedOperation(const OperationMethodNNPtr &methodIn); + explicit PROJBasedOperation(const OperationMethodNNPtr &methodIn); void _exportToPROJString(io::PROJStringFormatter *formatter) const override; // throw(FormattingException) -- cgit v1.2.3 From 2622d3851573cd44fc7b36bfd15f07215f434d4b Mon Sep 17 00:00:00 2001 From: Mike Taves Date: Mon, 18 Mar 2019 23:58:41 +1300 Subject: Normalize CMake with cmakelint, 2-space indent --- include/proj/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/proj/CMakeLists.txt b/include/proj/CMakeLists.txt index 0f889f74..0d9abee3 100644 --- a/include/proj/CMakeLists.txt +++ b/include/proj/CMakeLists.txt @@ -2,6 +2,6 @@ set(installdest ${INCLUDEDIR}/proj) install( FILES util.hpp metadata.hpp common.hpp crs.hpp datum.hpp - coordinatesystem.hpp coordinateoperation.hpp io.hpp nn.hpp + coordinatesystem.hpp coordinateoperation.hpp io.hpp nn.hpp DESTINATION ${installdest} ) -- cgit v1.2.3 From 8763ea7f01bd349df29c5c4ce3b4edd6252eff37 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 24 Mar 2019 20:01:45 +0100 Subject: WKT2 parser: update to OGC 18-010r6 - Allow ID[] in base CRS of Derived CRS - Allow VERSION[] in non-conversion coordinate operations - Use VERSION[] to set operationVersion member of CoordinateOperation - Export operationVersion in WKT2:2018 --- include/proj/coordinateoperation.hpp | 6 ++++++ include/proj/internal/io_internal.hpp | 1 + 2 files changed, 7 insertions(+) (limited to 'include') diff --git a/include/proj/coordinateoperation.hpp b/include/proj/coordinateoperation.hpp index af1c293f..4397ed60 100644 --- a/include/proj/coordinateoperation.hpp +++ b/include/proj/coordinateoperation.hpp @@ -150,6 +150,8 @@ class PROJ_GCC_DLL CoordinateOperation : public common::ObjectUsage, PROJ_DLL bool hasBallparkTransformation() const; + PROJ_DLL static const std::string OPERATION_VERSION_KEY; + protected: PROJ_INTERNAL CoordinateOperation(); PROJ_INTERNAL CoordinateOperation(const CoordinateOperation &other); @@ -171,6 +173,10 @@ class PROJ_GCC_DLL CoordinateOperation : public common::ObjectUsage, const std::vector &accuracies); PROJ_INTERNAL void setHasBallparkTransformation(bool b); + PROJ_INTERNAL void + setProperties(const util::PropertyMap + &properties); // throw(InvalidValueTypeException) + private: PROJ_OPAQUE_PRIVATE_DATA CoordinateOperation &operator=(const CoordinateOperation &other) = delete; diff --git a/include/proj/internal/io_internal.hpp b/include/proj/internal/io_internal.hpp index 403698db..f614fc67 100644 --- a/include/proj/internal/io_internal.hpp +++ b/include/proj/internal/io_internal.hpp @@ -133,6 +133,7 @@ class WKTConstants { static const std::string BASEENGCRS; static const std::string BASEPARAMCRS; static const std::string BASETIMECRS; + static const std::string VERSION; // WKT2 alternate (longer or shorter) static const std::string GEODETICCRS; -- cgit v1.2.3 From 72f0e8a895a861e4323cac61b73f807c8a5f1c0d Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 25 Mar 2019 12:11:21 +0100 Subject: crs.cpp: remove non-intented (harmless here) pass by reference of a pointer --- include/proj/crs.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/proj/crs.hpp b/include/proj/crs.hpp index b9594165..ed3463cd 100644 --- a/include/proj/crs.hpp +++ b/include/proj/crs.hpp @@ -503,7 +503,7 @@ class PROJ_GCC_DLL DerivedCRS : virtual public SingleCRS { PROJ_INTERNAL void setDerivingConversionCRS(); PROJ_INTERNAL void baseExportToWKT( - io::WKTFormatter *&formatter, const std::string &keyword, + io::WKTFormatter *formatter, const std::string &keyword, const std::string &baseKeyword) const; // throw(FormattingException) PROJ_INTERNAL bool -- cgit v1.2.3 From d4fd50f10ecabb9e9642cb4f877262e082677be4 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 25 Mar 2019 12:07:35 +0100 Subject: WKT2_2018: export ID in base crs node, when there is none on top of upper node This is the standard logic, that is now possible since ID is allowed in BASEGEOGCRS and similar node --- include/proj/io.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/proj/io.hpp b/include/proj/io.hpp index 8cf8e3c4..90163001 100644 --- a/include/proj/io.hpp +++ b/include/proj/io.hpp @@ -195,8 +195,7 @@ class PROJ_GCC_DLL WKTFormatter { WKT2_2018_SIMPLIFIED, /** WKT1 as traditionally output by GDAL, deriving from OGC 01-009. - A notable departuPROJ_GCC_DLLre from WKT1_GDAL with respect to OGC - 01-009 is + A notable departure from WKT1_GDAL with respect to OGC 01-009 is that in WKT1_GDAL, the unit of the PRIMEM value is always degrees. */ WKT1_GDAL, -- cgit v1.2.3 From 46f08f1434f66a4160d7c74923efcfb81505b398 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 25 Mar 2019 12:44:05 +0100 Subject: WKT2_2018: always export ID in base crs node, even if there is one on upper node This is a particular logic allowed by paragraph 7.3.3 Identifier of OGC 18-010r6 --- include/proj/io.hpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/proj/io.hpp b/include/proj/io.hpp index 90163001..ace8ad9d 100644 --- a/include/proj/io.hpp +++ b/include/proj/io.hpp @@ -302,6 +302,8 @@ class PROJ_GCC_DLL WKTFormatter { PROJ_INTERNAL bool primeMeridianOrParameterUnitOmittedIfSameAsAxis() const; PROJ_INTERNAL bool primeMeridianInDegree() const; PROJ_INTERNAL bool outputCSUnitOnlyOnceIfSame() const; + PROJ_INTERNAL bool idOnTopLevelOnly() const; + PROJ_INTERNAL bool topLevelHasId() const; /** WKT version. */ enum class Version { -- cgit v1.2.3 From 09db4826d4a1e5df900cb4b93a4b3eae2c487cb9 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 25 Mar 2019 13:56:43 +0100 Subject: WKT2_2018: always export ID of SOURCECRS/TARGETCRS and STEPs even if there is one on upper node This is a particular logic allowed by paragraph 7.3.3 Identifier of OGC 18-010r6 --- include/proj/io.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/proj/io.hpp b/include/proj/io.hpp index ace8ad9d..5386ca6c 100644 --- a/include/proj/io.hpp +++ b/include/proj/io.hpp @@ -261,6 +261,13 @@ class PROJ_GCC_DLL WKTFormatter { PROJ_INTERNAL void popOutputId(); PROJ_INTERNAL bool outputId() const; + PROJ_INTERNAL void pushHasId(bool hasId); + PROJ_INTERNAL void popHasId(); + + PROJ_INTERNAL void pushDisableUsage(); + PROJ_INTERNAL void popDisableUsage(); + PROJ_INTERNAL bool outputUsage() const; + PROJ_INTERNAL void pushAxisLinearUnit(const common::UnitOfMeasureNNPtr &unit); PROJ_INTERNAL void popAxisLinearUnit(); -- cgit v1.2.3 From 6a7e24dce79f93b73f4919f267df2fdf3ee95713 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 28 Mar 2019 15:26:00 +0100 Subject: Add proj_normalize_for_visualization() Fixes #1301 This function takes the output PJ from proj_create_crs_to_crs(), and add (or undo) the needed axis swap operations so that the object returned by proj_normalize_for_visualization() has the usual GIS axis order. In this implementation, this does something only if the coordinate system of the source or target CRS, geographic or projected, has NORTH, EAST ordering. CompoundCRS wrapping those objects are also handled. --- include/proj/coordinateoperation.hpp | 2 ++ include/proj/crs.hpp | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'include') diff --git a/include/proj/coordinateoperation.hpp b/include/proj/coordinateoperation.hpp index 4397ed60..9e7812c7 100644 --- a/include/proj/coordinateoperation.hpp +++ b/include/proj/coordinateoperation.hpp @@ -152,6 +152,8 @@ class PROJ_GCC_DLL CoordinateOperation : public common::ObjectUsage, PROJ_DLL static const std::string OPERATION_VERSION_KEY; + PROJ_DLL CoordinateOperationNNPtr normalizeForVisualization() const; + protected: PROJ_INTERNAL CoordinateOperation(); PROJ_INTERNAL CoordinateOperation(const CoordinateOperation &other); diff --git a/include/proj/crs.hpp b/include/proj/crs.hpp index ed3463cd..33bf3b61 100644 --- a/include/proj/crs.hpp +++ b/include/proj/crs.hpp @@ -126,6 +126,10 @@ class PROJ_GCC_DLL CRS : public common::ObjectUsage { PROJ_FOR_TEST CRSNNPtr alterCSLinearUnit(const common::UnitOfMeasure &unit) const; + PROJ_INTERNAL bool mustAxisOrderBeSwitchedForVisualization() const; + + PROJ_INTERNAL CRSNNPtr normalizeForVisualization() const; + //! @endcond protected: -- cgit v1.2.3 From 421653b9c61f253e800ca749e9b1a9ba0688d72a Mon Sep 17 00:00:00 2001 From: Mike Taves Date: Tue, 16 Apr 2019 09:38:51 +0000 Subject: CMake: better support for Intel compiler --- include/proj/internal/internal.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/proj/internal/internal.hpp b/include/proj/internal/internal.hpp index 84fc1c2b..220c137b 100644 --- a/include/proj/internal/internal.hpp +++ b/include/proj/internal/internal.hpp @@ -53,7 +53,7 @@ #if ((defined(__clang__) && \ (__clang_major__ > 3 || \ (__clang_major__ == 3 && __clang_minor__ >= 7))) || \ - __GNUC__ >= 7) + (__GNUC__ >= 7 && !__INTEL_COMPILER)) /** Macro for fallthrough in a switch case construct */ #define PROJ_FALLTHROUGH [[clang::fallthrough]]; #else -- cgit v1.2.3 From d9e2a15f2e17b6710ccffa3e271595e006ceadf2 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 16 Apr 2019 19:26:16 +0200 Subject: createOperations(): do not attempt using a unrelated datum intermediate when doing geog2D<-->geog3D conversions of same datum Seen when testing transformations between "CR 05" (EPSG:5365) and "CR-SIRGAS" (EPSG:8907) which require going through their corresponding 3D GeogCRS to find a Helmert transformation. --- include/proj/coordinateoperation.hpp | 15 +++++++++++++++ include/proj/internal/coordinateoperation_internal.hpp | 18 ++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/proj/coordinateoperation.hpp b/include/proj/coordinateoperation.hpp index 9e7812c7..994cbab2 100644 --- a/include/proj/coordinateoperation.hpp +++ b/include/proj/coordinateoperation.hpp @@ -154,6 +154,12 @@ class PROJ_GCC_DLL CoordinateOperation : public common::ObjectUsage, PROJ_DLL CoordinateOperationNNPtr normalizeForVisualization() const; + PROJ_PRIVATE : + //! @cond Doxygen_Suppress + PROJ_FOR_TEST CoordinateOperationNNPtr + shallowClone() const; + //! @endcond + protected: PROJ_INTERNAL CoordinateOperation(); PROJ_INTERNAL CoordinateOperation(const CoordinateOperation &other); @@ -179,6 +185,8 @@ class PROJ_GCC_DLL CoordinateOperation : public common::ObjectUsage, setProperties(const util::PropertyMap &properties); // throw(InvalidValueTypeException) + PROJ_INTERNAL virtual CoordinateOperationNNPtr _shallowClone() const = 0; + private: PROJ_OPAQUE_PRIVATE_DATA CoordinateOperation &operator=(const CoordinateOperation &other) = delete; @@ -1328,6 +1336,8 @@ class PROJ_GCC_DLL Conversion : public SingleOperation { PROJ_FRIEND(crs::ProjectedCRS); PROJ_INTERNAL bool addWKTExtensionNode(io::WKTFormatter *formatter) const; + PROJ_INTERNAL CoordinateOperationNNPtr _shallowClone() const override; + private: PROJ_OPAQUE_PRIVATE_DATA Conversion &operator=(const Conversion &other) = delete; @@ -1543,6 +1553,8 @@ class PROJ_GCC_DLL Transformation : public SingleOperation { PROJ_INTERNAL TransformationNNPtr inverseAsTransformation() const; + PROJ_INTERNAL CoordinateOperationNNPtr _shallowClone() const override; + private: PROJ_OPAQUE_PRIVATE_DATA }; @@ -1634,12 +1646,15 @@ class PROJ_GCC_DLL ConcatenatedOperation final : public CoordinateOperation { //! @endcond protected: + PROJ_INTERNAL ConcatenatedOperation(const ConcatenatedOperation &other); PROJ_INTERNAL explicit ConcatenatedOperation( const std::vector &operationsIn); PROJ_INTERNAL void _exportToPROJString(io::PROJStringFormatter *formatter) const override; // throw(FormattingException) + PROJ_INTERNAL CoordinateOperationNNPtr _shallowClone() const override; + INLINED_MAKE_SHARED private: diff --git a/include/proj/internal/coordinateoperation_internal.hpp b/include/proj/internal/coordinateoperation_internal.hpp index 680e805e..207c20b4 100644 --- a/include/proj/internal/coordinateoperation_internal.hpp +++ b/include/proj/internal/coordinateoperation_internal.hpp @@ -109,8 +109,9 @@ using InverseCoordinateOperationNNPtr = util::nn; */ class InverseCoordinateOperation : virtual public CoordinateOperation { public: - InverseCoordinateOperation(const CoordinateOperationNNPtr &forwardOperation, - bool wktSupportsInversion); + InverseCoordinateOperation( + const CoordinateOperationNNPtr &forwardOperationIn, + bool wktSupportsInversion); ~InverseCoordinateOperation() override; @@ -124,6 +125,10 @@ class InverseCoordinateOperation : virtual public CoordinateOperation { CoordinateOperationNNPtr inverse() const override; + const CoordinateOperationNNPtr &forwardOperation() const { + return forwardOperation_; + } + protected: CoordinateOperationNNPtr forwardOperation_; bool wktSupportsInversion_; @@ -174,6 +179,8 @@ class InverseConversion : public Conversion, public InverseCoordinateOperation { #endif static CoordinateOperationNNPtr create(const ConversionNNPtr &forward); + + CoordinateOperationNNPtr _shallowClone() const override; }; // --------------------------------------------------------------------------- @@ -204,6 +211,8 @@ class InverseTransformation : public Transformation, return InverseCoordinateOperation::inverse(); } + TransformationNNPtr inverseAsTransformation() const; + #ifdef _MSC_VER // To avoid a warning C4250: // 'osgeo::proj::operation::InverseTransformation': inherits @@ -216,6 +225,8 @@ class InverseTransformation : public Transformation, #endif static TransformationNNPtr create(const TransformationNNPtr &forward); + + CoordinateOperationNNPtr _shallowClone() const override; }; // --------------------------------------------------------------------------- @@ -253,11 +264,14 @@ class PROJBasedOperation : public SingleOperation { gridsNeeded(const io::DatabaseContextPtr &databaseContext) const override; protected: + PROJBasedOperation(const PROJBasedOperation &) = default; explicit PROJBasedOperation(const OperationMethodNNPtr &methodIn); void _exportToPROJString(io::PROJStringFormatter *formatter) const override; // throw(FormattingException) + CoordinateOperationNNPtr _shallowClone() const override; + INLINED_MAKE_SHARED private: -- cgit v1.2.3 From 292807eee9e1194175b64cb5c0a9f0b432352abc Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 22 Apr 2019 20:05:36 +0200 Subject: proj_create(): add support for compoundCRS and concatenatedOperation named from their components Support following syntaxes: - OGC URN combining references for compoundCRS: e.g. "urn:ogc:def:crs,crs:EPSG::2393,crs:EPSG::5717" - its GDAL shortcut: e.g. "EPSG:2393+5717" - OGC URN combining references for concatenated operations: e.g. "urn:ogc:def:coordinateOperation,coordinateOperation:EPSG::3895,coordinateOperation:EPSG::1618" --- include/proj/io.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/proj/io.hpp b/include/proj/io.hpp index 5386ca6c..a603533e 100644 --- a/include/proj/io.hpp +++ b/include/proj/io.hpp @@ -993,16 +993,16 @@ class PROJ_GCC_DLL AuthorityFactory { PROJ_INTERNAL std::list createCompoundCRSFromExisting(const crs::CompoundCRSNNPtr &crs) const; + + PROJ_INTERNAL crs::CRSNNPtr + createCoordinateReferenceSystem(const std::string &code, + bool allowCompound) const; //! @endcond protected: PROJ_INTERNAL AuthorityFactory(const DatabaseContextNNPtr &context, const std::string &authorityName); - PROJ_INTERNAL crs::CRSNNPtr - createCoordinateReferenceSystem(const std::string &code, - bool allowCompound) const; - PROJ_INTERNAL crs::GeodeticCRSNNPtr createGeodeticCRS(const std::string &code, bool geographicOnly) const; -- cgit v1.2.3 From 61cf8c5b29c82ab7e46b207bd125eaad49c03021 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 6 May 2019 19:45:27 +0200 Subject: createOperations(): for 'Amersfoort / RD New + NAP height' (EPSG:7415) to ETRS89 (EPSG:4937), make sure that the vgridshift is applied first (ie on Amersfoort datum) before the hgridshift --- include/proj/coordinateoperation.hpp | 3 ++- include/proj/internal/internal.hpp | 3 +++ include/proj/io.hpp | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/proj/coordinateoperation.hpp b/include/proj/coordinateoperation.hpp index 994cbab2..7ade26f2 100644 --- a/include/proj/coordinateoperation.hpp +++ b/include/proj/coordinateoperation.hpp @@ -1476,7 +1476,8 @@ class PROJ_GCC_DLL Transformation : public SingleOperation { PROJ_DLL static TransformationNNPtr createGravityRelatedHeightToGeographic3D( const util::PropertyMap &properties, const crs::CRSNNPtr &sourceCRSIn, - const crs::CRSNNPtr &targetCRSIn, const std::string &filename, + const crs::CRSNNPtr &targetCRSIn, const crs::CRSPtr &interpolationCRSIn, + const std::string &filename, const std::vector &accuracies); PROJ_DLL static TransformationNNPtr createVERTCON( diff --git a/include/proj/internal/internal.hpp b/include/proj/internal/internal.hpp index 220c137b..2222a264 100644 --- a/include/proj/internal/internal.hpp +++ b/include/proj/internal/internal.hpp @@ -140,6 +140,9 @@ std::string toupper(const std::string &osStr); PROJ_FOR_TEST std::vector split(const std::string &osStr, char separator); +PROJ_FOR_TEST std::vector split(const std::string &osStr, + const std::string &separator); + bool ci_equal(const char *a, const char *b) noexcept; #ifdef SUPPORT_DELETED_FUNCTION diff --git a/include/proj/io.hpp b/include/proj/io.hpp index a603533e..c553598d 100644 --- a/include/proj/io.hpp +++ b/include/proj/io.hpp @@ -427,7 +427,8 @@ class PROJ_GCC_DLL PROJStringFormatter { PROJ_INTERNAL void setOmitProjLongLatIfPossible(bool omit); PROJ_INTERNAL bool omitProjLongLatIfPossible() const; - PROJ_INTERNAL void setOmitZUnitConversion(bool omit); + PROJ_INTERNAL void pushOmitZUnitConversion(); + PROJ_INTERNAL void popOmitZUnitConversion(); PROJ_INTERNAL bool omitZUnitConversion() const; PROJ_INTERNAL void setDropEarlyBindingsTerms(bool drop); -- cgit v1.2.3