From 5ddddfac622f40a4de920460b64e88e7b9cb5b68 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 12 Mar 2021 22:43:42 +0100 Subject: Add C/C++ API to get SQL statements to insert a CRS into database --- include/proj/io.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/proj') diff --git a/include/proj/io.hpp b/include/proj/io.hpp index 2f935a0c..5f0dd475 100644 --- a/include/proj/io.hpp +++ b/include/proj/io.hpp @@ -838,6 +838,19 @@ class PROJ_GCC_DLL DatabaseContext { PROJ_DLL std::vector getDatabaseStructure() const; + PROJ_DLL void startInsertStatementsSession(); + + PROJ_DLL std::string + suggestsCodeFor(const common::IdentifiedObjectNNPtr &object, + const std::string &authName, bool numericCode); + + PROJ_DLL std::vector + getInsertStatementsFor(const common::IdentifiedObjectNNPtr &object, + const std::string &authName, const std::string &code, + bool numericCode); + + PROJ_DLL void stopInsertStatementsSession(); + PROJ_PRIVATE : //! @cond Doxygen_Suppress PROJ_DLL void * -- cgit v1.2.3 From 8a67a3fb96ffdb29887b2954dd4bb8af92f6960d Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 13 Mar 2021 11:46:08 +0100 Subject: SQL output: add capability to restrict the authorities into which to look for intermediate objects --- include/proj/io.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/proj') diff --git a/include/proj/io.hpp b/include/proj/io.hpp index 5f0dd475..96a97142 100644 --- a/include/proj/io.hpp +++ b/include/proj/io.hpp @@ -844,10 +844,10 @@ class PROJ_GCC_DLL DatabaseContext { suggestsCodeFor(const common::IdentifiedObjectNNPtr &object, const std::string &authName, bool numericCode); - PROJ_DLL std::vector - getInsertStatementsFor(const common::IdentifiedObjectNNPtr &object, - const std::string &authName, const std::string &code, - bool numericCode); + PROJ_DLL std::vector getInsertStatementsFor( + const common::IdentifiedObjectNNPtr &object, + const std::string &authName, const std::string &code, bool numericCode, + const std::vector &allowedAuthorities = {"EPSG", "PROJ"}); PROJ_DLL void stopInsertStatementsSession(); -- cgit v1.2.3