aboutsummaryrefslogtreecommitdiff
path: root/include/proj/io.hpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-07-06 17:06:23 +0200
committerEven Rouault <even.rouault@spatialys.com>2019-07-08 00:05:00 +0200
commitece151aed1b4bf2634de5759f37fd7bc005e8313 (patch)
tree8e2e38daaffc878cc3ba673857e66274555e3dcc /include/proj/io.hpp
parent17f0b0b3bc65ffba39bf6f22a12b2cc7fcb9bafd (diff)
downloadPROJ-ece151aed1b4bf2634de5759f37fd7bc005e8313.tar.gz
PROJ-ece151aed1b4bf2634de5759f37fd7bc005e8313.zip
CRS JSON: export GeographicCRS and Projected CRS
Diffstat (limited to 'include/proj/io.hpp')
-rw-r--r--include/proj/io.hpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/proj/io.hpp b/include/proj/io.hpp
index 71a6430d..cfb4b3f7 100644
--- a/include/proj/io.hpp
+++ b/include/proj/io.hpp
@@ -483,12 +483,31 @@ class PROJ_GCC_DLL JSONFormatter {
PROJ_PRIVATE :
//! @cond Doxygen_Suppress
- PROJ_INTERNAL PROJ::CPLJSonStreamingWriter &
+ PROJ_INTERNAL CPLJSonStreamingWriter &
writer() const;
+ struct ObjectContext {
+ JSONFormatter &m_formatter;
+
+ ObjectContext(const ObjectContext &) = delete;
+ ObjectContext(ObjectContext &&) = default;
+
+ explicit ObjectContext(JSONFormatter &formatter, const char *objectType,
+ bool hasId);
+ ~ObjectContext();
+ };
+ PROJ_INTERNAL inline ObjectContext MakeObjectContext(const char *objectType,
+ bool hasId) {
+ return ObjectContext(*this, objectType, hasId);
+ }
+
+ PROJ_INTERNAL void setAllowIDInImmediateChild();
+
// cppcheck-suppress functionStatic
PROJ_INTERNAL bool outputId() const;
+ PROJ_INTERNAL bool outputUsage() const;
+
//! @endcond
protected: