diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2018-11-14 17:40:42 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2018-11-14 22:48:29 +0100 |
| commit | d928db15d53805d9b728b440079756081961c536 (patch) | |
| tree | e862a961d26bedb34c58e4f28ef0bdeedb5f3225 /scripts/doxygen.sh | |
| parent | 330e8bf686f9c4524075ca1ff50cbca6c9e091da (diff) | |
| download | PROJ-d928db15d53805d9b728b440079756081961c536.tar.gz PROJ-d928db15d53805d9b728b440079756081961c536.zip | |
Implement RFC 2: Initial integration of "GDAL SRS barn" work
This work mostly consists of:
- a C++ implementation of the ISO-19111:2018 / OGC Topic 2
"Referencing by coordinates" classes to represent Datums,
Coordinate systems, CRSs (Coordinate Reference Systems) and
Coordinate Operations.
- methods to convert between this C++ modeling and WKT1, WKT2
and PROJ string representations of those objects
- management and query of a SQLite3 database of CRS and Coordinate Operation definition
- a C API binding part of those capabilities
This is all-in-one squashed commit of the work of
https://github.com/OSGeo/proj.4/pull/1040
Diffstat (limited to 'scripts/doxygen.sh')
| -rwxr-xr-x | scripts/doxygen.sh | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/scripts/doxygen.sh b/scripts/doxygen.sh new file mode 100755 index 00000000..2f44dca8 --- /dev/null +++ b/scripts/doxygen.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +set -eu + +SCRIPT_DIR=$(dirname "$0") +case $SCRIPT_DIR in + "/"*) + ;; + ".") + SCRIPT_DIR=$(pwd) + ;; + *) + SCRIPT_DIR=$(pwd)/$(dirname "$0") + ;; +esac + +TOPDIR="$SCRIPT_DIR/.." + +pushd "${TOPDIR}" > /dev/null || exit + +# HTML generation +# Check that doxygen runs warning free +rm -rf docs/build/html/ +mkdir -p docs/build/ +doxygen > /tmp/docs_log.txt 2>&1 +if grep -i warning /tmp/docs_log.txt; then + echo "Doxygen warnings found" && cat /tmp/docs_log.txt && /bin/false; +else + echo "No Doxygen warnings found"; +fi + + +# XML generation (for Breathe) +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 include/proj src/proj.h docs/build/tmp_breathe/general_doc.dox.reworked.h") | doxygen - > /tmp/docs_log.txt 2>&1 +if grep -i warning /tmp/docs_log.txt; then + echo "Doxygen warnings found" && cat /tmp/docs_log.txt && /bin/false; +else + echo "No Doxygen warnings found"; +fi + +for i in ${TOPDIR}/docs/build/xml/*; do + +# Fix Breathe error on Doxygen XML +# Type must be either just a name or a typedef-like declaration. +# If just a name: +# Invalid definition: Expected end of definition. [error at 32] +# osgeo::proj::common::MeasurePtr = typedef std::shared_ptr<Measure> + sed "s/ = typedef /=/g" < $i > $i.tmp; + mv $i.tmp $i +done + +# There is a confusion for Breathe between PROJStringFormatter::Convention and WKTFormatter:Convention +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_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 + +popd > /dev/null || exit + |
