diff options
| -rw-r--r-- | docs/source/conf.py | 2 | ||||
| -rw-r--r-- | docs/source/development/reference/cpp/common.rst | 2 | ||||
| -rw-r--r-- | docs/source/development/reference/cpp/cpp_general.rst | 2 | ||||
| -rw-r--r-- | docs/source/development/reference/cpp/crs.rst | 2 | ||||
| -rw-r--r-- | docs/source/development/reference/cpp/cs.rst | 2 | ||||
| -rw-r--r-- | docs/source/development/reference/cpp/datum.rst | 2 | ||||
| -rw-r--r-- | docs/source/development/reference/cpp/io.rst | 2 | ||||
| -rw-r--r-- | docs/source/development/reference/cpp/metadata.rst | 2 | ||||
| -rw-r--r-- | docs/source/development/reference/cpp/operation.rst | 2 | ||||
| -rw-r--r-- | docs/source/development/reference/cpp/util.rst | 2 | ||||
| -rw-r--r-- | docs/source/development/reference/datatypes.rst | 39 | ||||
| -rw-r--r-- | docs/source/development/reference/functions.rst | 50 | ||||
| -rwxr-xr-x | scripts/doxygen.sh | 10 | ||||
| -rw-r--r-- | src/filemanager.cpp | 10 | ||||
| -rw-r--r-- | src/proj.h | 2 |
15 files changed, 117 insertions, 14 deletions
diff --git a/docs/source/conf.py b/docs/source/conf.py index b9e1fa8a..c2142667 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -376,7 +376,7 @@ texinfo_documents = [ #texinfo_no_detailmenu = False breathe_projects = { - "cpp_stuff":"../build/xml/", + "doxygen_api":"../build/xml/", } import redirects diff --git a/docs/source/development/reference/cpp/common.rst b/docs/source/development/reference/cpp/common.rst index c1a28d37..4e92f6b2 100644 --- a/docs/source/development/reference/cpp/common.rst +++ b/docs/source/development/reference/cpp/common.rst @@ -4,5 +4,5 @@ common namespace ---------------- .. doxygennamespace:: osgeo::proj::common - :project: cpp_stuff + :project: doxygen_api :members: diff --git a/docs/source/development/reference/cpp/cpp_general.rst b/docs/source/development/reference/cpp/cpp_general.rst index 3b47d01e..d54daaa8 100644 --- a/docs/source/development/reference/cpp/cpp_general.rst +++ b/docs/source/development/reference/cpp/cpp_general.rst @@ -4,4 +4,4 @@ General documentation --------------------- .. doxygenfile:: general_doc.dox.reworked.h - :project: cpp_stuff + :project: doxygen_api diff --git a/docs/source/development/reference/cpp/crs.rst b/docs/source/development/reference/cpp/crs.rst index 2abea378..f8df118e 100644 --- a/docs/source/development/reference/cpp/crs.rst +++ b/docs/source/development/reference/cpp/crs.rst @@ -4,5 +4,5 @@ crs namespace ------------- .. doxygennamespace:: osgeo::proj::crs - :project: cpp_stuff + :project: doxygen_api :members: diff --git a/docs/source/development/reference/cpp/cs.rst b/docs/source/development/reference/cpp/cs.rst index b168213f..376ae6a6 100644 --- a/docs/source/development/reference/cpp/cs.rst +++ b/docs/source/development/reference/cpp/cs.rst @@ -4,5 +4,5 @@ cs namespace ------------ .. doxygennamespace:: osgeo::proj::cs - :project: cpp_stuff + :project: doxygen_api :members: diff --git a/docs/source/development/reference/cpp/datum.rst b/docs/source/development/reference/cpp/datum.rst index 1fee5f8a..0a545a68 100644 --- a/docs/source/development/reference/cpp/datum.rst +++ b/docs/source/development/reference/cpp/datum.rst @@ -4,5 +4,5 @@ datum namespace --------------- .. doxygennamespace:: osgeo::proj::datum - :project: cpp_stuff + :project: doxygen_api :members: diff --git a/docs/source/development/reference/cpp/io.rst b/docs/source/development/reference/cpp/io.rst index 9da0f680..9729af90 100644 --- a/docs/source/development/reference/cpp/io.rst +++ b/docs/source/development/reference/cpp/io.rst @@ -4,5 +4,5 @@ io namespace ------------ .. doxygennamespace:: osgeo::proj::io - :project: cpp_stuff + :project: doxygen_api :members: diff --git a/docs/source/development/reference/cpp/metadata.rst b/docs/source/development/reference/cpp/metadata.rst index b3960122..348627e8 100644 --- a/docs/source/development/reference/cpp/metadata.rst +++ b/docs/source/development/reference/cpp/metadata.rst @@ -4,5 +4,5 @@ metadata namespace ------------------ .. doxygennamespace:: osgeo::proj::metadata - :project: cpp_stuff + :project: doxygen_api :members: diff --git a/docs/source/development/reference/cpp/operation.rst b/docs/source/development/reference/cpp/operation.rst index bc3f201d..88096cb8 100644 --- a/docs/source/development/reference/cpp/operation.rst +++ b/docs/source/development/reference/cpp/operation.rst @@ -4,5 +4,5 @@ operation namespace ------------------- .. doxygennamespace:: osgeo::proj::operation - :project: cpp_stuff + :project: doxygen_api :members: diff --git a/docs/source/development/reference/cpp/util.rst b/docs/source/development/reference/cpp/util.rst index 1aba2954..bc9676a4 100644 --- a/docs/source/development/reference/cpp/util.rst +++ b/docs/source/development/reference/cpp/util.rst @@ -4,5 +4,5 @@ util namespace -------------- .. doxygennamespace:: osgeo::proj::util - :project: cpp_stuff + :project: doxygen_api :members: diff --git a/docs/source/development/reference/datatypes.rst b/docs/source/development/reference/datatypes.rst index 18bd7efd..7ec17eb1 100644 --- a/docs/source/development/reference/datatypes.rst +++ b/docs/source/development/reference/datatypes.rst @@ -797,11 +797,48 @@ Logging .. versionadded:: 5.1.0 +Setting custom I/O functions +------------------------------------------------------------------------------- + +.. versionadded:: 7.0.0 + +.. doxygenstruct:: PROJ_FILE_API + :project: doxygen_api + :members: + +.. doxygentypedef:: PROJ_FILE_HANDLE + :project: doxygen_api + +.. doxygenenum:: PROJ_OPEN_ACCESS + :project: doxygen_api + + +Network related functionality +------------------------------------------------------------------------------- + +.. versionadded:: 7.0.0 + +.. doxygentypedef:: PROJ_NETWORK_HANDLE + :project: doxygen_api + +.. doxygentypedef:: proj_network_open_cbk_type + :project: doxygen_api + +.. doxygentypedef:: proj_network_close_cbk_type + :project: doxygen_api + +.. doxygentypedef:: proj_network_get_header_value_cbk_type + :project: doxygen_api + +.. doxygentypedef:: proj_network_read_range_type + :project: doxygen_api + + C API for ISO-19111 functionality ------------------------------------------------------------------------------- .. doxygengroup:: iso19111_types - :project: cpp_stuff + :project: doxygen_api :content-only: diff --git a/docs/source/development/reference/functions.rst b/docs/source/development/reference/functions.rst index c010fd13..a2a0c3ae 100644 --- a/docs/source/development/reference/functions.rst +++ b/docs/source/development/reference/functions.rst @@ -697,6 +697,54 @@ Various :returns: :c:type:`int` 1 if output units is expected in radians, otherwise 0 +Setting custom I/O functions +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. versionadded:: 7.0.0 + +.. doxygenfunction:: proj_context_set_fileapi + :project: doxygen_api + +.. doxygenfunction:: proj_context_set_sqlite3_vfs_name + :project: doxygen_api + + +Network related functionality +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. versionadded:: 7.0.0 + +.. doxygenfunction:: proj_context_set_network_callbacks + :project: doxygen_api + +.. doxygenfunction:: proj_context_set_enable_network + :project: doxygen_api + +.. doxygenfunction:: proj_context_set_url_endpoint + :project: doxygen_api + +.. doxygenfunction:: proj_grid_cache_set_enable + :project: doxygen_api + +.. doxygenfunction:: proj_grid_cache_set_filename + :project: doxygen_api + +.. doxygenfunction:: proj_grid_cache_set_max_size + :project: doxygen_api + +.. doxygenfunction:: proj_grid_cache_set_ttl + :project: doxygen_api + +.. doxygenfunction:: proj_grid_cache_clear + :project: doxygen_api + +.. doxygenfunction:: proj_is_download_needed + :project: doxygen_api + +.. doxygenfunction:: proj_download_file + :project: doxygen_api + + Cleanup ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -727,6 +775,6 @@ which are not of type CRS (can be tested with :c:func:`proj_is_crs`), will return an error when used with functions of this section. .. doxygengroup:: iso19111_functions - :project: cpp_stuff + :project: doxygen_api :content-only: diff --git a/scripts/doxygen.sh b/scripts/doxygen.sh index 9646eed8..8c3f9722 100755 --- a/scripts/doxygen.sh +++ b/scripts/doxygen.sh @@ -34,7 +34,11 @@ fi mkdir -p docs/build/tmp_breathe python scripts/generate_breathe_friendly_general_doc.py rm -rf docs/build/xml/ -(cat Doxyfile; printf "GENERATE_HTML=NO\nGENERATE_XML=YES\nINPUT= src/iso19111 include/proj src/proj.h src/filemanager.cpp docs/build/tmp_breathe/general_doc.dox.reworked.h") | doxygen - > docs/build/tmp_breathe/docs_log.txt 2>&1 + +# Ugly hack to workaround a bug of Doxygen 1.8.17 that erroneously detect proj_network_get_header_value_cbk_type/ as a variable +sed "s/const char\* (\*proj_network_get_header_value_cbk_type/CONST_CHAR\* (\*proj_network_get_header_value_cbk_type/" < src/proj.h > docs/build/tmp_breathe/proj.h + +(cat Doxyfile; printf "GENERATE_HTML=NO\nGENERATE_XML=YES\nINPUT= src/iso19111 include/proj docs/build/tmp_breathe/proj.h src/filemanager.cpp docs/build/tmp_breathe/general_doc.dox.reworked.h") | doxygen - > docs/build/tmp_breathe/docs_log.txt 2>&1 if grep -i warning docs/build/tmp_breathe/docs_log.txt; then echo "Doxygen warnings found" && cat docs/build/tmp_breathe/docs_log.txt && /bin/false; else @@ -56,5 +60,9 @@ done sed "s/Convention/Convention_/g" < ${TOPDIR}/docs/build/xml/classosgeo_1_1proj_1_1io_1_1WKTFormatter.xml | sed "s/WKT2_2018/_WKT2_2018/g" | sed "s/WKT2_2019/_WKT2_2019/g" | sed "s/WKT2_2015/_WKT2_2015/g" | sed "s/WKT1_GDAL/_WKT1_GDAL/g" | sed "s/WKT1_ESRI/_WKT1_ESRI/g" > ${TOPDIR}/docs/build/xml/classosgeo_1_1proj_1_1io_1_1WKTFormatter.xml.tmp mv ${TOPDIR}/docs/build/xml/classosgeo_1_1proj_1_1io_1_1WKTFormatter.xml.tmp ${TOPDIR}/docs/build/xml/classosgeo_1_1proj_1_1io_1_1WKTFormatter.xml +# Ugly hack to workaround a bug of Doxygen 1.8.17 that erroneously detect proj_network_get_header_value_cbk_type/ as a variable +sed "s/CONST_CHAR/const char/" < ${TOPDIR}/docs/build/xml/proj_8h.xml > ${TOPDIR}/docs/build/xml/proj_8h.xml.tmp +mv ${TOPDIR}/docs/build/xml/proj_8h.xml.tmp ${TOPDIR}/docs/build/xml/proj_8h.xml + popd > /dev/null || exit diff --git a/src/filemanager.cpp b/src/filemanager.cpp index 1857e397..f4c77c80 100644 --- a/src/filemanager.cpp +++ b/src/filemanager.cpp @@ -2881,6 +2881,7 @@ NS_PROJ_END * @param user_data Arbitrary pointer provided by the user, and passed to the * above callbacks. May be NULL. * @return TRUE in case of success. + * @since 7.0 */ int proj_context_set_fileapi(PJ_CONTEXT *ctx, const PROJ_FILE_API *fileapi, void *user_data) { @@ -2926,6 +2927,7 @@ int proj_context_set_fileapi(PJ_CONTEXT *ctx, const PROJ_FILE_API *fileapi, * @param ctx PROJ context, or NULL * @param name SQLite3 VFS name. If NULL is passed, default implementation by * SQLite will be used. + * @since 7.0 */ void proj_context_set_sqlite3_vfs_name(PJ_CONTEXT *ctx, const char *name) { if (ctx == nullptr) { @@ -2948,6 +2950,7 @@ void proj_context_set_sqlite3_vfs_name(PJ_CONTEXT *ctx, const char *name) { * @param user_data Arbitrary pointer provided by the user, and passed to the * above callbacks. May be NULL. * @return TRUE in case of success. + * @since 7.0 */ int proj_context_set_network_callbacks( PJ_CONTEXT *ctx, proj_network_open_cbk_type open_cbk, @@ -2979,6 +2982,7 @@ int proj_context_set_network_callbacks( * @param enable TRUE if network access is allowed. * @return TRUE if network access is possible. That is either libcurl is * available, or an alternate interface has been set. +* @since 7.0 */ int proj_context_set_enable_network(PJ_CONTEXT *ctx, int enable) { if (ctx == nullptr) { @@ -3005,6 +3009,7 @@ int proj_context_set_enable_network(PJ_CONTEXT *ctx, int enable) { * * @param ctx PROJ context, or NULL * @param url Endpoint URL. Must NOT be NULL. +* @since 7.0 */ void proj_context_set_url_endpoint(PJ_CONTEXT *ctx, const char *url) { if (ctx == nullptr) { @@ -3023,6 +3028,7 @@ void proj_context_set_url_endpoint(PJ_CONTEXT *ctx, const char *url) { * * @param ctx PROJ context, or NULL * @param enabled TRUE if the cache is enabled. +* @since 7.0 */ void proj_grid_cache_set_enable(PJ_CONTEXT *ctx, int enabled) { if (ctx == nullptr) { @@ -3041,6 +3047,7 @@ void proj_grid_cache_set_enable(PJ_CONTEXT *ctx, int enabled) { * @param ctx PROJ context, or NULL * @param fullname Full name to the cache (encoded in UTF-8). If set to NULL, * caching will be disabled. +* @since 7.0 */ void proj_grid_cache_set_filename(PJ_CONTEXT *ctx, const char *fullname) { if (ctx == nullptr) { @@ -3059,6 +3066,7 @@ void proj_grid_cache_set_filename(PJ_CONTEXT *ctx, const char *fullname) { * @param ctx PROJ context, or NULL * @param max_size_MB Maximum size, in mega-bytes (1024*1024 bytes), or * negative value to set unlimited size. +* @since 7.0 */ void proj_grid_cache_set_max_size(PJ_CONTEXT *ctx, int max_size_MB) { if (ctx == nullptr) { @@ -3085,6 +3093,7 @@ void proj_grid_cache_set_max_size(PJ_CONTEXT *ctx, int max_size_MB) { * * @param ctx PROJ context, or NULL * @param ttl_seconds Delay in seconds. Use negative value for no expiration. +* @since 7.0 */ void proj_grid_cache_set_ttl(PJ_CONTEXT *ctx, int ttl_seconds) { if (ctx == nullptr) { @@ -3100,6 +3109,7 @@ void proj_grid_cache_set_ttl(PJ_CONTEXT *ctx, int ttl_seconds) { /** Clear the local cache of grid chunks. * * @param ctx PROJ context, or NULL +* @since 7.0 */ void proj_grid_cache_clear(PJ_CONTEXT *ctx) { if (ctx == nullptr) { @@ -360,7 +360,7 @@ int PROJ_DLL proj_context_get_use_proj4_init_rules(PJ_CONTEXT *ctx, int from_leg typedef struct PROJ_FILE_HANDLE PROJ_FILE_HANDLE; /** Open access / mode */ -typedef enum +typedef enum PROJ_OPEN_ACCESS { /** Read-only access. Equivalent to "rb" */ PROJ_OPEN_ACCESS_READ_ONLY, |
