aboutsummaryrefslogtreecommitdiff
path: root/include/proj/coordinateoperation.hpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-08-20 13:22:01 +0200
committerGitHub <noreply@github.com>2019-08-20 13:22:01 +0200
commit2c9c015a6529548f5a5d448c78bc9b565d751590 (patch)
tree2597c59e8270f1480785c97f7441ee0b295c29b3 /include/proj/coordinateoperation.hpp
parente52fc2aa58504e6f0658da821bdd543d7a39df34 (diff)
parentcad1c5cf61fc00759bf4ad17b0b34f57f4945de6 (diff)
downloadPROJ-2c9c015a6529548f5a5d448c78bc9b565d751590.tar.gz
PROJ-2c9c015a6529548f5a5d448c78bc9b565d751590.zip
Merge pull request #1547 from rouault/json_export
Add CRS JSON export (refs #1545)
Diffstat (limited to 'include/proj/coordinateoperation.hpp')
-rw-r--r--include/proj/coordinateoperation.hpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/include/proj/coordinateoperation.hpp b/include/proj/coordinateoperation.hpp
index 7ade26f2..2f6095f7 100644
--- a/include/proj/coordinateoperation.hpp
+++ b/include/proj/coordinateoperation.hpp
@@ -116,7 +116,8 @@ using CoordinateOperationNNPtr = util::nn<CoordinateOperationPtr>;
* \remark Implements CoordinateOperation from \ref ISO_19111_2019
*/
class PROJ_GCC_DLL CoordinateOperation : public common::ObjectUsage,
- public io::IPROJStringExportable {
+ public io::IPROJStringExportable,
+ public io::IJSONExportable {
public:
//! @cond Doxygen_Suppress
PROJ_DLL ~CoordinateOperation() override;
@@ -291,6 +292,7 @@ struct MethodMapping;
*/
class PROJ_GCC_DLL GeneralParameterValue : public util::BaseObject,
public io::IWKTExportable,
+ public io::IJSONExportable,
public util::IComparable {
public:
//! @cond Doxygen_Suppress
@@ -299,6 +301,9 @@ class PROJ_GCC_DLL GeneralParameterValue : public util::BaseObject,
PROJ_INTERNAL void _exportToWKT(io::WKTFormatter *formatter)
const override = 0; // throw(io::FormattingException)
+ PROJ_INTERNAL void _exportToJSON(io::JSONFormatter *formatter)
+ const override = 0; // throw(FormattingException)
+
PROJ_INTERNAL bool _isEquivalentTo(
const util::IComparable *other,
util::IComparable::Criterion criterion =
@@ -442,6 +447,9 @@ class PROJ_GCC_DLL OperationParameterValue final
PROJ_INTERNAL void _exportToWKT(io::WKTFormatter *formatter)
const override; // throw(io::FormattingException)
+ PROJ_INTERNAL void _exportToJSON(io::JSONFormatter *formatter)
+ const override; // throw(FormattingException)
+
PROJ_INTERNAL bool
_isEquivalentTo(const util::IComparable *other,
util::IComparable::Criterion criterion =
@@ -481,7 +489,8 @@ using OperationMethodNNPtr = util::nn<OperationMethodPtr>;
*
* \remark Implements OperationMethod from \ref ISO_19111_2019
*/
-class PROJ_GCC_DLL OperationMethod : public common::IdentifiedObject {
+class PROJ_GCC_DLL OperationMethod : public common::IdentifiedObject,
+ public io::IJSONExportable {
public:
//! @cond Doxygen_Suppress
PROJ_DLL ~OperationMethod() override;
@@ -507,6 +516,9 @@ class PROJ_GCC_DLL OperationMethod : public common::IdentifiedObject {
PROJ_INTERNAL void _exportToWKT(io::WKTFormatter *formatter)
const override; // throw(io::FormattingException)
+ PROJ_INTERNAL void _exportToJSON(io::JSONFormatter *formatter)
+ const override; // throw(FormattingException)
+
PROJ_INTERNAL bool
_isEquivalentTo(const util::IComparable *other,
util::IComparable::Criterion criterion =
@@ -1315,6 +1327,9 @@ class PROJ_GCC_DLL Conversion : public SingleOperation {
_exportToPROJString(io::PROJStringFormatter *formatter)
const override; // throw(FormattingException)
+ PROJ_INTERNAL void _exportToJSON(io::JSONFormatter *formatter)
+ const override; // throw(FormattingException)
+
PROJ_INTERNAL const char *getESRIMethodName() const;
PROJ_INTERNAL const char *getWKT1GDALMethodName() const;
@@ -1535,6 +1550,9 @@ class PROJ_GCC_DLL Transformation : public SingleOperation {
PROJ_INTERNAL void _exportToWKT(io::WKTFormatter *formatter)
const override; // throw(io::FormattingException)
+ PROJ_INTERNAL void _exportToJSON(io::JSONFormatter *formatter)
+ const override; // throw(FormattingException)
+
PROJ_INTERNAL TransformationNNPtr shallowClone() const;
//! @endcond
@@ -1640,6 +1658,9 @@ class PROJ_GCC_DLL ConcatenatedOperation final : public CoordinateOperation {
util::IComparable::Criterion criterion =
util::IComparable::Criterion::STRICT) const override;
+ PROJ_INTERNAL void _exportToJSON(io::JSONFormatter *formatter)
+ const override; // throw(FormattingException)
+
PROJ_INTERNAL static void
fixStepsDirection(const crs::CRSNNPtr &concatOpSourceCRS,
const crs::CRSNNPtr &concatOpTargetCRS,