diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2020-12-21 17:28:48 +0100 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2020-12-21 17:28:48 +0100 |
| commit | 5aad0d25f8423b8b88a716d0333c7bd19f6184c7 (patch) | |
| tree | f0a248ef08fb51ef0ec29178ef41fd4168d4c85d /scripts | |
| parent | c3efbd23a5bf26f1dfd5bc55ae3488d5665ace98 (diff) | |
| parent | 1cafe3e602d3f697c8d2daaa9b634f3ad23b0d53 (diff) | |
| download | PROJ-5aad0d25f8423b8b88a716d0333c7bd19f6184c7.tar.gz PROJ-5aad0d25f8423b8b88a716d0333c7bd19f6184c7.zip | |
Merge remote-tracking branch 'osgeo/master'
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/build_esri_projection_mapping.py | 60 | ||||
| -rwxr-xr-x | scripts/doxygen.sh | 2 | ||||
| -rw-r--r-- | scripts/reference_exported_symbols.txt | 3 | ||||
| -rwxr-xr-x | scripts/reformat_cpp.sh | 5 |
4 files changed, 53 insertions, 17 deletions
diff --git a/scripts/build_esri_projection_mapping.py b/scripts/build_esri_projection_mapping.py index 00a49c68..752f9850 100644 --- a/scripts/build_esri_projection_mapping.py +++ b/scripts/build_esri_projection_mapping.py @@ -751,7 +751,19 @@ def generate_mapping(WKT2_name, esri_proj_name, Params, suffix=''): all_projs.append([esri_proj_name, WKT2_name_s, c_name]) else: all_projs.append([esri_proj_name, WKT2_name, c_name]) - print('static const ESRIParamMapping %s[] = { ' % c_name) + + qualifier = 'static ' + if c_name in ('paramsESRI_Plate_Carree', + 'paramsESRI_Equidistant_Cylindrical', + 'paramsESRI_Gauss_Kruger', + 'paramsESRI_Transverse_Mercator', + 'paramsESRI_Hotine_Oblique_Mercator_Azimuth_Natural_Origin', + 'paramsESRI_Rectified_Skew_Orthomorphic_Natural_Origin', + 'paramsESRI_Hotine_Oblique_Mercator_Azimuth_Center', + 'paramsESRI_Rectified_Skew_Orthomorphic_Center'): + qualifier = '' + + print(qualifier + 'const ESRIParamMapping %s[] = { ' % c_name) for param in Params: for param_name in param: param_value = param[param_name] @@ -803,24 +815,22 @@ print(""" * DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#ifndef FROM_COORDINATE_OPERATION_CPP -#error This file should only be included from coordinateoperation.cpp +#ifndef FROM_PROJ_CPP +#define FROM_PROJ_CPP #endif -#ifndef ESRI_PROJECTION_MAPPINGS_HH_INCLUDED -#define ESRI_PROJECTION_MAPPINGS_HH_INCLUDED +#include "esriparammappings.hpp" +#include "proj_constants.h" -#include "coordinateoperation_internal.hpp" +#include "proj/internal/internal.hpp" -//! @cond Doxygen_Suppress +NS_PROJ_START -// --------------------------------------------------------------------------- +using namespace internal; -// anonymous namespace -namespace { +namespace operation { -using namespace ::NS_PROJ; -using namespace ::NS_PROJ::operation; +//! @cond Doxygen_Suppress """) @@ -841,6 +851,7 @@ for item in config: count += 1 print('') + print('static const ESRIMethodMapping esriMappings[] = {') for esri_proj_name, WKT2_name, c_name in all_projs: if WKT2_name.startswith('EPSG_'): @@ -852,11 +863,32 @@ for esri_proj_name, WKT2_name, c_name in all_projs: print('};') print(""" + // --------------------------------------------------------------------------- -} // namespace { +const ESRIMethodMapping *getEsriMappings(size_t &nElts) { + nElts = sizeof(esriMappings) / sizeof(esriMappings[0]); + return esriMappings; +} + +// --------------------------------------------------------------------------- + +std::vector<const ESRIMethodMapping *> +getMappingsFromESRI(const std::string &esri_name) { + std::vector<const ESRIMethodMapping *> res; + for (const auto &mapping : esriMappings) { + if (ci_equal(esri_name, mapping.esri_name)) { + res.push_back(&mapping); + } + } + return res; +} //! @endcond -#endif // ESRI_PROJECTION_MAPPINGS_HH_INCLUDED +// --------------------------------------------------------------------------- + +} // namespace operation +NS_PROJ_END + """) diff --git a/scripts/doxygen.sh b/scripts/doxygen.sh index fd3a0468..f169c78e 100755 --- a/scripts/doxygen.sh +++ b/scripts/doxygen.sh @@ -38,7 +38,7 @@ rm -rf docs/build/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\* (\*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 src/networkfilemanager.cpp docs/build/tmp_breathe/general_doc.dox.reworked.h") | doxygen - > docs/build/tmp_breathe/docs_log.txt 2>&1 +(cat Doxyfile; printf "GENERATE_HTML=NO\nGENERATE_XML=YES\nINPUT= src/iso19111 src/iso19111/operation include/proj docs/build/tmp_breathe/proj.h src/filemanager.cpp src/networkfilemanager.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 diff --git a/scripts/reference_exported_symbols.txt b/scripts/reference_exported_symbols.txt index 167b8a27..a5fd41ca 100644 --- a/scripts/reference_exported_symbols.txt +++ b/scripts/reference_exported_symbols.txt @@ -784,6 +784,7 @@ proj_context_create proj_context_delete_cpp_context(projCppContext*) proj_context_destroy proj_context_errno +proj_context_errno_string proj_context_get_database_metadata proj_context_get_database_path proj_context_get_url_endpoint @@ -992,7 +993,7 @@ proj_list_get_count proj_list_operations proj_list_prime_meridians proj_list_units -proj_log_error(PJconsts*, char const*, ...) +proj_log_error(PJconsts const*, char const*, ...) proj_log_func proj_log_level proj_lp_dist diff --git a/scripts/reformat_cpp.sh b/scripts/reformat_cpp.sh index 50a572a1..89237b65 100755 --- a/scripts/reformat_cpp.sh +++ b/scripts/reformat_cpp.sh @@ -16,7 +16,10 @@ esac TOPDIR="$SCRIPT_DIR/.." for i in "$TOPDIR"/include/proj/*.hpp "$TOPDIR"/include/proj/internal/*.hpp \ - "$TOPDIR"/src/iso19111/*.cpp "$TOPDIR"/test/unit/*.cpp \ + "$TOPDIR"/src/iso19111/*.cpp \ + "$TOPDIR"/src/iso19111/operation/*.cpp \ + "$TOPDIR"/src/iso19111/operation/*.hpp \ + "$TOPDIR"/test/unit/*.cpp \ "$TOPDIR"/src/apps/projinfo.cpp "$TOPDIR"/src/apps/projsync.cpp \ "$TOPDIR"/src/tracing.cpp "$TOPDIR"/src/grids.hpp "$TOPDIR"/src/grids.cpp \ "$TOPDIR"/src/filemanager.hpp "$TOPDIR"/src/filemanager.cpp \ |
