From 706b18b7568cb5581ae99fe7d53d4ac5707868b5 Mon Sep 17 00:00:00 2001 From: Alexandre Barreto Date: Tue, 3 Jan 2023 11:19:22 -0500 Subject: [PATCH] Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE --- docs/source/apps/geod.rst | 6 +++ docs/source/apps/proj.rst | 6 +++ docs/source/apps/projinfo.rst | 4 ++ docs/source/community/code_contributions.rst | 12 +++++ docs/source/conf.py | 4 ++ docs/source/faq.rst | 8 ++++ docs/source/install.rst | 8 ++++ docs/source/operations/projections/aeqd.rst | 5 ++ docs/source/operations/projections/gnom.rst | 27 ++++++++++- docs/source/resource_files.rst | 14 +++++- docs/source/usage/quickstart.rst | 4 ++ src/apps/cct.cpp | 8 ++++ src/conversions/unitconvert.cpp | 24 ++++++++++ src/ell_set.cpp | 4 ++ src/iso19111/crs.cpp | 35 ++++++++++++++ src/iso19111/operation/conversion.cpp | 6 +++ src/pipeline.cpp | 5 ++ src/projections/aeqd.cpp | 48 ++++++++++++++++++-- src/projections/gnom.cpp | 28 ++++++++++++ src/transformations/gridshift.cpp | 8 ++++ src/transformations/helmert.cpp | 12 +++++ src/transformations/hgridshift.cpp | 24 ++++++++++ src/transformations/molodensky.cpp | 24 ++++++++++ src/transformations/vgridshift.cpp | 24 ++++++++++ test/gie/builtins.gie | 33 ++++++++++++++ test/unit/test_c_api.cpp | 17 ++++++- test/unit/test_crs.cpp | 17 +++++++ test/unit/test_io.cpp | 16 +++++++ 28 files changed, 422 insertions(+), 9 deletions(-) diff --git a/docs/source/apps/geod.rst b/docs/source/apps/geod.rst index 1c6bc68c8a15..0e68180ed075 100644 --- a/docs/source/apps/geod.rst +++ b/docs/source/apps/geod.rst @@ -47,6 +47,7 @@ geod <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -277,6 +278,8 @@ geod >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) .. _invgeod: ================================================================================ @@ -313,6 +316,7 @@ invgeod <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -743,6 +747,8 @@ invgeod >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) Synopsis ******** diff --git a/docs/source/apps/proj.rst b/docs/source/apps/proj.rst index e91ab7ec3f4e..0d0b850e74f8 100644 --- a/docs/source/apps/proj.rst +++ b/docs/source/apps/proj.rst @@ -47,6 +47,7 @@ proj <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -277,6 +278,8 @@ proj >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) .. _invproj: ================================================================================ @@ -313,6 +316,7 @@ invproj <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -743,6 +747,8 @@ invproj >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) .. only:: html Cartographic projection filter. diff --git a/docs/source/apps/projinfo.rst b/docs/source/apps/projinfo.rst index 4b5e716b2ca9..ddfdd31d327f 100644 --- a/docs/source/apps/projinfo.rst +++ b/docs/source/apps/projinfo.rst @@ -343,6 +343,7 @@ It can also be used to query coordinate operations available between two CRS. <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -899,6 +900,9 @@ The program is named with some reference to the GDAL :program:`gdalsrsinfo` that ======= The program is named with some reference to the GDAL :program:`gdalsrsinfo` that offers >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +The program is named with some reference to the GDAL `gdalsrsinfo `__ utility that offers +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) partly similar services. diff --git a/docs/source/community/code_contributions.rst b/docs/source/community/code_contributions.rst index 5d9125e2cfee..20d7592e5564 100644 --- a/docs/source/community/code_contributions.rst +++ b/docs/source/community/code_contributions.rst @@ -168,6 +168,7 @@ Preliminary step: install clang. For example: <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -724,6 +725,9 @@ Configure PROJ with the :program:`scan-build` utility of clang: ======= Configure PROJ with the :program:`scan-build` utility of clang: >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +Configure PROJ with the `scan-build `__ utility of clang: +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) :: mkdir csa_build @@ -773,6 +777,7 @@ Configure PROJ with the :program:`scan-build` utility of clang: <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1329,6 +1334,9 @@ Build using :program:`scan-build`: ======= Build using :program:`scan-build`: >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +Build using ``scan-build``: +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) :: @@ -1378,6 +1386,7 @@ If CSA finds errors, they will be emitted during the build. And in which case, <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1934,6 +1943,9 @@ at the end of the build process, :program:`scan-build` will emit a warning messa ======= at the end of the build process, :program:`scan-build` will emit a warning message >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +at the end of the build process, ``scan-build`` will emit a warning message +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) indicating errors have been found and how to display the error report. This is with something like diff --git a/docs/source/conf.py b/docs/source/conf.py index 5f2054d2a882..32ee37969014 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -81,6 +81,7 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -605,6 +606,9 @@ >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + 'program_with_link', +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ] # Add any paths that contain templates here, relative to this directory. diff --git a/docs/source/faq.rst b/docs/source/faq.rst index e8f88f75366c..7be87935d88e 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -66,6 +66,7 @@ separate column. <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -622,6 +623,9 @@ separate column. ======= :program:`ogr2ogr` application. >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + `ogr2ogr `__ application. +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) Can I transform from *abc* to *xyz*? -------------------------------------------------------------------------------- @@ -690,6 +694,7 @@ ETRS89/UTM32N (EPSG:25832) and ETRS89/DKTM1 (EPSG:4093): <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1275,6 +1280,9 @@ how to use it. See the :program:`projinfo` :ref:`documentation ` for more info on how to use it. >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +See the :program:`projinfo` documentation for more info on how to use it. +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) Coordinate reference system *xyz* is not in the EPSG registry, what do I do? -------------------------------------------------------------------------------- diff --git a/docs/source/install.rst b/docs/source/install.rst index 83ab72c82312..e3ec5c151b3f 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -145,6 +145,7 @@ Fedora <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -701,6 +702,9 @@ On Fedora the :program:`dnf` package manager is used:: ======= On Fedora the :program:`dnf` package manager is used:: >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +On Fedora the ``dnf`` package manager is used:: +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) sudo dnf install proj @@ -750,6 +754,7 @@ Red Hat <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1306,6 +1311,9 @@ On Red Hat based system packages are installed with :program:`yum`:: ======= On Red Hat based system packages are installed with :program:`yum`:: >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +On Red Hat based system packages are installed with ``yum``:: +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) sudo yum install proj diff --git a/docs/source/operations/projections/aeqd.rst b/docs/source/operations/projections/aeqd.rst index 8418b3e5c478..a4c2eed429fe 100644 --- a/docs/source/operations/projections/aeqd.rst +++ b/docs/source/operations/projections/aeqd.rst @@ -51,6 +51,7 @@ Azimuthal Equidistant <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -615,6 +616,10 @@ Azimuthal Equidistant >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +| **Defined area** | Global | ++---------------------+----------------------------------------------------------+ +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) | **Alias** | aeqd | +---------------------+----------------------------------------------------------+ | **Domain** | 2D | diff --git a/docs/source/operations/projections/gnom.rst b/docs/source/operations/projections/gnom.rst index 70526de7b49c..2b8c595faf6b 100644 --- a/docs/source/operations/projections/gnom.rst +++ b/docs/source/operations/projections/gnom.rst @@ -47,6 +47,7 @@ Gnomonic <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -277,6 +278,8 @@ Gnomonic >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) For a sphere, the gnomonic projection is a projection from the center of the sphere onto a plane tangent to the center point of the projection. This projects great circles to straight lines. For an ellipsoid, it is @@ -309,6 +312,7 @@ point). For details, see Section 8 of :cite:`Karney2013`. <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -1052,17 +1056,23 @@ point). For details, see Section 8 of :cite:`Karney2013`. ======= ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +---------------------+----------------------------------------------------------+ -| **Classification** | Pseudocylindrical | +| **Classification** | Azimuthal | +---------------------+----------------------------------------------------------+ -| **Available forms** | Forward and inverse, spherical projection | +| **Available forms** | Forward and inverse, spherical and ellipsoidal | +---------------------+----------------------------------------------------------+ +<<<<<<< HEAD | **Defined area** | Global | <<<<<<< HEAD >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +| **Defined area** | Within a quarter circumference of the center point | +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +---------------------+----------------------------------------------------------+ | **Alias** | gnom | +---------------------+----------------------------------------------------------+ @@ -1122,6 +1132,7 @@ point). For details, see Section 8 of :cite:`Karney2013`. <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1678,6 +1689,9 @@ point). For details, see Section 8 of :cite:`Karney2013`. ======= proj-string: ``+proj=gnom +lat_0=90 +lon_0=-50`` >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + proj-string: ``+proj=gnom +lat_0=90 +lon_0=-50 +R=6.4e6`` +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) Parameters ################################################################################ @@ -1731,6 +1745,7 @@ Parameters <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> locationtech-main @@ -2224,6 +2239,11 @@ Parameters ======= >>>>>>> 9b68b76b81 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +.. include:: ../options/x_0.rst + +.. include:: ../options/y_0.rst +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) .. include:: ../options/ellps.rst @@ -2241,6 +2261,7 @@ Parameters <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 9b68b76b81 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -2634,3 +2655,5 @@ Parameters >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) diff --git a/docs/source/resource_files.rst b/docs/source/resource_files.rst index 94cd0aa23bdf..1ac6a187e46f 100644 --- a/docs/source/resource_files.rst +++ b/docs/source/resource_files.rst @@ -756,6 +756,7 @@ To compile the program do something like the following to produce the binary <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1312,6 +1313,9 @@ To compile the program do something like the following to produce the binary ======= :program:`htdp` from the source code. >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +``htdp`` from the source code. +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) :: @@ -1400,6 +1404,7 @@ continental US region is used. The script creates a set of sample points for <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> locationtech-main @@ -2265,17 +2270,24 @@ The ``htdp`` program supports transformations between many CRSes and for each (o ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) the grid definition, runs :program:`htdp` against it and then parses the +======= +the grid definition, runs ``htdp`` against it and then parses the +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) resulting points and computes a point by point shift to encode into the final -grid shift file. By default it is assumed that :program:`htdp` is in the +grid shift file. By default it is assumed that ``htdp`` is in the executable path. If not, please provide the path to the executable using the ``-htdp`` switch. +<<<<<<< HEAD The :program:`htdp` program supports transformations between many CRSes and for each (or <<<<<<< HEAD >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +The ``htdp`` program supports transformations between many CRSes and for each (or +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) most?) of them you need to provide a date at which the CRS is fixed. The full set of CRS Ids available in the HTDP program are: diff --git a/docs/source/usage/quickstart.rst b/docs/source/usage/quickstart.rst index 5754d4cc531d..f980feb9fa9c 100644 --- a/docs/source/usage/quickstart.rst +++ b/docs/source/usage/quickstart.rst @@ -78,6 +78,7 @@ type the input data manually and getting a response presented on screen. <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -634,6 +635,9 @@ pipe data to the utility, for instance by using the :program:`echo` command: ======= pipe data to the utility, for instance by using the :program:`echo` command: >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +pipe data to the utility, for instance by using the ``echo`` command: +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) :: diff --git a/src/apps/cct.cpp b/src/apps/cct.cpp index 79a6ecfb0bb8..70f5d736f8eb 100644 --- a/src/apps/cct.cpp +++ b/src/apps/cct.cpp @@ -121,6 +121,7 @@ Thomas Knudsen, thokn@sdfe.dk, 2016-05-25/2017-10-26 <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -645,6 +646,9 @@ Thomas Knudsen, thokn@sdfe.dk, 2016-05-25/2017-10-26 >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +#include +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) #include // std::ifstream #include @@ -846,6 +850,7 @@ int main(int argc, char **argv) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1402,6 +1407,9 @@ int main(int argc, char **argv) { ======= verbose = MIN(opt_given (o, "v"), 3); /* log level can't be larger than 3 */ >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + verbose = std::min(opt_given (o, "v"), 3); /* log level can't be larger than 3 */ +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) if( verbose > 0 ) { proj_log_level (PJ_DEFAULT_CTX, static_cast(verbose)); } diff --git a/src/conversions/unitconvert.cpp b/src/conversions/unitconvert.cpp index 05cd3f6b4b18..832e29d85377 100644 --- a/src/conversions/unitconvert.cpp +++ b/src/conversions/unitconvert.cpp @@ -366,6 +366,7 @@ static PJ_XYZ forward_3d(PJ_LPZ lpz, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -596,6 +597,8 @@ static PJ_XYZ forward_3d(PJ_LPZ lpz, PJ *P) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) // Assigning in 2 steps avoids cppcheck warning // "Overlapping read/write of union is undefined behavior" @@ -630,6 +633,7 @@ static PJ_XYZ forward_3d(PJ_LPZ lpz, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -1060,6 +1064,8 @@ static PJ_XYZ forward_3d(PJ_LPZ lpz, PJ *P) { >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) const auto xy = forward_2d(point.lp, P); point.xy = xy; @@ -1121,6 +1127,7 @@ static PJ_LPZ reverse_3d(PJ_XYZ xyz, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1351,6 +1358,8 @@ static PJ_LPZ reverse_3d(PJ_XYZ xyz, PJ *P) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) // Assigning in 2 steps avoids cppcheck warning // "Overlapping read/write of union is undefined behavior" @@ -1385,6 +1394,7 @@ static PJ_LPZ reverse_3d(PJ_XYZ xyz, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -1815,6 +1825,8 @@ static PJ_LPZ reverse_3d(PJ_XYZ xyz, PJ *P) { >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) const auto lp = reverse_2d(point.xy, P); point.lp = lp; @@ -1875,6 +1887,7 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -2105,6 +2118,8 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) // Assigning in 2 steps avoids cppcheck warning // "Overlapping read/write of union is undefined behavior" @@ -2141,6 +2156,7 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -2605,6 +2621,8 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { ======= coo.xyz = forward_3d(coo.lpz, P); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) if (Q->t_in_id >= 0) coo.xyzt.t = time_units[Q->t_in_id].t_in( coo.xyzt.t ); @@ -2664,6 +2682,7 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -2894,6 +2913,8 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) // Assigning in 2 steps avoids cppcheck warning // "Overlapping read/write of union is undefined behavior" @@ -2930,6 +2951,7 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -3394,6 +3416,8 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { ======= coo.lpz = reverse_3d(coo.xyz, P); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) if (Q->t_out_id >= 0) coo.xyzt.t = time_units[Q->t_out_id].t_in( coo.xyzt.t ); diff --git a/src/ell_set.cpp b/src/ell_set.cpp index d82b37eef0f8..514bb18cf7ba 100644 --- a/src/ell_set.cpp +++ b/src/ell_set.cpp @@ -627,6 +627,7 @@ int pj_calc_ellipsoid_params (PJ *P, double a, double es) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1183,6 +1184,9 @@ int pj_calc_ellipsoid_params (PJ *P, double a, double es) { ======= if (P->f == 1.0) { >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + if (!(P->f >= 0.0 && P->f < 1.0)) { +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) proj_log_error(P, _("Invalid eccentricity")); proj_errno_set (P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); return PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE; diff --git a/src/iso19111/crs.cpp b/src/iso19111/crs.cpp index 29089bd69cab..31e757b9535c 100644 --- a/src/iso19111/crs.cpp +++ b/src/iso19111/crs.cpp @@ -6999,6 +6999,7 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -7574,6 +7575,10 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { ======= const auto addCRS = [&](const ProjectedCRSNNPtr &crs, const bool eqName) { >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + const auto addCRS = [&](const ProjectedCRSNNPtr &crs, const bool eqName, + bool hasNonMatchingId) { +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) const auto &l_unit = cs->axisList()[0]->unit(); if (_isEquivalentTo(crs.get(), util::IComparable::Criterion:: @@ -7636,6 +7641,7 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -8192,6 +8198,9 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { ======= res.emplace_back(crs, 100); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + res.emplace_back(crs, hasNonMatchingId ? 70 : 100); +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) } else { res.emplace_back(crs, eqName ? 90 : 70); } @@ -8275,6 +8284,7 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -8799,6 +8809,9 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + bool hasNonMatchingId = false; +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) if (hasCodeCompatibleOfAuthorityFactory(this, authorityFactory)) { // If the CRS has already an id, check in the database for the // official object, and verify that they are equivalent. @@ -8858,6 +8871,7 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -9447,6 +9461,11 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { ======= return res; >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + if (match) { + return res; + } +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) } catch (const std::exception &) { } } @@ -9494,6 +9513,7 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -10018,6 +10038,9 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + hasNonMatchingId = true; +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) } else if (!insignificantName) { for (int ipass = 0; ipass < 2; ipass++) { const bool approximateMatch = ipass == 1; @@ -10076,6 +10099,7 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -10632,6 +10656,9 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { ======= if (addCRS(crsNN, eqName).second == 100) { >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + if (addCRS(crsNN, eqName, false).second == 100) { +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) return res; } } @@ -10710,6 +10737,7 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -11295,6 +11323,9 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { if (!hasCodeCompatibleOfAuthorityFactory(this, authorityFactory) && !foundEquivalentName && (res.empty() || res.front().second < 50)) { >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + if (!foundEquivalentName && (res.empty() || res.front().second < 50)) { +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) std::set> alreadyKnown; for (const auto &pair : res) { const auto &ids = pair.first->identifiers(); @@ -11359,6 +11390,7 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -11915,6 +11947,9 @@ ProjectedCRS::identify(const io::AuthorityFactoryPtr &authorityFactory) const { ======= addCRS(crs, insignificantName); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + addCRS(crs, insignificantName, hasNonMatchingId); +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) } res.sort(lambdaSort); diff --git a/src/iso19111/operation/conversion.cpp b/src/iso19111/operation/conversion.cpp index 9736319cd7fe..b9d410ce2246 100644 --- a/src/iso19111/operation/conversion.cpp +++ b/src/iso19111/operation/conversion.cpp @@ -33336,6 +33336,7 @@ void Conversion::_exportToPROJString( <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -33566,6 +33567,8 @@ void Conversion::_exportToPROJString( >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) // No need to add explicit f=0 or R_A if the ellipsoid is a // sphere if (strcmp(mapping->proj_name_aux, "f=0") == 0 || @@ -33600,6 +33603,7 @@ void Conversion::_exportToPROJString( <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 094787b30a (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -34088,6 +34092,8 @@ void Conversion::_exportToPROJString( // No need to add explicit f=0 if the ellipsoid is a sphere if (strcmp(mapping->proj_name_aux, "f=0") == 0) { >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) crs::CRS *horiz = l_sourceCRS.get(); const auto compound = dynamic_cast(horiz); diff --git a/src/pipeline.cpp b/src/pipeline.cpp index c96501d84d58..22aed62f30af 100644 --- a/src/pipeline.cpp +++ b/src/pipeline.cpp @@ -419,6 +419,7 @@ static void set_ellipsoid(PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1034,6 +1035,10 @@ static void set_ellipsoid(PJ *P) { geod_init(P->geod, P->a, P->es / (1 + sqrt(P->one_es))); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + if( pj_calc_ellipsoid_params (P, P->a, P->es) == 0 ) + geod_init(P->geod, P->a, P->f); +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) /* Re-attach the dangling list */ /* Note: cur will always be non 0 given argv_sentinel presence, */ diff --git a/src/projections/aeqd.cpp b/src/projections/aeqd.cpp index 90a1817189f7..b981ad812283 100644 --- a/src/projections/aeqd.cpp +++ b/src/projections/aeqd.cpp @@ -139,6 +139,7 @@ static PJ_XY aeqd_e_forward (PJ_LP lp, PJ *P) { /* Ellipsoidal, forward <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -925,6 +926,11 @@ static PJ_XY aeqd_e_forward (PJ_LP lp, PJ *P) { /* Ellipsoidal, forward >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + double lat1, lon1, lat2, lon2; + + coslam = cos(lp.lam); +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) switch (Q->mode) { case N_POLE: coslam = - coslam; @@ -973,6 +979,7 @@ static PJ_XY aeqd_e_forward (PJ_LP lp, PJ *P) { /* Ellipsoidal, forward <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1537,6 +1544,10 @@ static PJ_XY aeqd_e_forward (PJ_LP lp, PJ *P) { /* Ellipsoidal, forward >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + cosphi = cos(lp.phi); + sinphi = sin(lp.phi); +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) rho = fabs(Q->Mp - pj_mlfn(lp.phi, sinphi, cosphi, Q->en)); xy.x = rho * sin(lp.lam); xy.y = rho * coslam; @@ -1591,6 +1602,7 @@ static PJ_XY aeqd_e_forward (PJ_LP lp, PJ *P) { /* Ellipsoidal, forward <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1821,6 +1833,8 @@ static PJ_XY aeqd_e_forward (PJ_LP lp, PJ *P) { /* Ellipsoidal, forward >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) lat1 = P->phi0 / DEG_TO_RAD; lon1 = 0; lat2 = lp.phi / DEG_TO_RAD; @@ -1848,6 +1862,7 @@ static PJ_XY aeqd_e_forward (PJ_LP lp, PJ *P) { /* Ellipsoidal, forward <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -2701,9 +2716,12 @@ static PJ_XY aeqd_e_forward (PJ_LP lp, PJ *P) { /* Ellipsoidal, forward ======= ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) - geod_inverse(&Q->g, phi1, lam1, phi2, lam2, &s12, &azi1, &azi2); + geod_inverse(&Q->g, lat1, lon1, lat2, lon2, &s12, &azi1, &azi2); azi1 *= DEG_TO_RAD; +<<<<<<< HEAD xy.x = s12 * sin(azi1) / P->a; xy.y = s12 * cos(azi1) / P->a; <<<<<<< HEAD @@ -2791,6 +2809,10 @@ static PJ_XY aeqd_e_forward (PJ_LP lp, PJ *P) { /* Ellipsoidal, forward >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + xy.x = s12 * sin(azi1); + xy.y = s12 * cos(azi1); +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) break; } return xy; @@ -6625,6 +6647,7 @@ static PJ_LP aeqd_e_inverse (PJ_XY xy, PJ *P) { /* Ellipsoidal, inverse <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -7410,6 +7433,11 @@ static PJ_LP aeqd_e_inverse (PJ_XY xy, PJ *P) { /* Ellipsoidal, inverse >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + double azi1, azi2, s12, lat1, lon1, lat2, lon2; + + if ((s12 = hypot(xy.x, xy.y)) < EPS10) { +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) lp.phi = P->phi0; lp.lam = 0.; return (lp); @@ -7458,6 +7486,7 @@ static PJ_LP aeqd_e_inverse (PJ_XY xy, PJ *P) { /* Ellipsoidal, inverse <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> locationtech-main @@ -8402,21 +8431,26 @@ static PJ_LP aeqd_e_inverse (PJ_XY xy, PJ *P) { /* Ellipsoidal, inverse x2 = xy.x * P->a; y2 = xy.y * P->a; >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) lat1 = P->phi0 / DEG_TO_RAD; - lon1 = P->lam0 / DEG_TO_RAD; - azi1 = atan2(x2, y2) / DEG_TO_RAD; - s12 = sqrt(x2 * x2 + y2 * y2); + lon1 = 0; + azi1 = atan2(xy.x, xy.y) / DEG_TO_RAD; // Clockwise from north geod_direct(&Q->g, lat1, lon1, azi1, s12, &lat2, &lon2, &azi2); lp.phi = lat2 * DEG_TO_RAD; lp.lam = lon2 * DEG_TO_RAD; - lp.lam -= P->lam0; } else { /* Polar */ +<<<<<<< HEAD lp.phi = pj_inv_mlfn(Q->mode == N_POLE ? Q->Mp - c : Q->Mp + c, Q->en); <<<<<<< HEAD >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + lp.phi = pj_inv_mlfn(Q->mode == N_POLE ? Q->Mp - s12 : Q->Mp + s12, + Q->en); +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) lp.lam = atan2(xy.x, Q->mode == N_POLE ? -xy.y : xy.y); } return lp; @@ -8515,6 +8549,7 @@ PJ *PROJECTION(aeqd) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -9071,6 +9106,9 @@ PJ *PROJECTION(aeqd) { ======= geod_init(&Q->g, P->a, P->es / (1 + sqrt(P->one_es))); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + geod_init(&Q->g, 1, P->f); +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) if (fabs(fabs(P->phi0) - M_HALFPI) < EPS10) { Q->mode = P->phi0 < 0. ? S_POLE : N_POLE; diff --git a/src/projections/gnom.cpp b/src/projections/gnom.cpp index 663a21383d86..786fc4a15485 100644 --- a/src/projections/gnom.cpp +++ b/src/projections/gnom.cpp @@ -45,6 +45,7 @@ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> locationtech-main @@ -610,9 +611,14 @@ ======= ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +#include +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +#include "geodesic.h" #include "proj.h" #include "proj_internal.h" +<<<<<<< HEAD #include <<<<<<< HEAD <<<<<<< HEAD @@ -850,6 +856,8 @@ >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) PROJ_HEAD(gnom, "Gnomonic") "\n\tAzi, Sph"; @@ -912,6 +920,7 @@ struct pj_opaque { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1436,6 +1445,9 @@ struct pj_opaque { >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + struct geod_geodesic g; +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) }; } // anonymous namespace @@ -1576,6 +1588,7 @@ static PJ_LP gnom_s_inverse (PJ_XY xy, PJ *P) { /* Spheroidal, inverse <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1806,6 +1819,8 @@ static PJ_LP gnom_s_inverse (PJ_XY xy, PJ *P) { /* Spheroidal, inverse >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) static PJ_XY gnom_e_forward (PJ_LP lp, PJ *P) { /* Ellipsoidal, forward */ PJ_XY xy = {0.0,0.0}; struct pj_opaque *Q = static_cast(P->opaque); @@ -1910,6 +1925,7 @@ static PJ_LP gnom_e_inverse (PJ_XY xy, PJ *P) { /* Ellipsoidal, inverse */ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -2340,6 +2356,8 @@ static PJ_LP gnom_e_inverse (PJ_XY xy, PJ *P) { /* Ellipsoidal, inverse */ >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) PJ *PROJECTION(gnom) { struct pj_opaque *Q = static_cast(calloc (1, sizeof (struct pj_opaque))); @@ -2390,6 +2408,7 @@ PJ *PROJECTION(gnom) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -2620,6 +2639,8 @@ PJ *PROJECTION(gnom) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) if (P->es == 0) { if (fabs(fabs(P->phi0) - M_HALFPI) < EPS10) { Q->mode = P->phi0 < 0. ? S_POLE : N_POLE; @@ -2653,6 +2674,7 @@ PJ *PROJECTION(gnom) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -3034,6 +3056,9 @@ PJ *PROJECTION(gnom) { ======= >>>>>>> 9b68b76b81 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= + +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) P->inv = gnom_s_inverse; P->fwd = gnom_s_forward; } else { @@ -3056,6 +3081,7 @@ PJ *PROJECTION(gnom) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 9b68b76b81 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -3458,6 +3484,8 @@ PJ *PROJECTION(gnom) { >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) P->es = 0.; return P; diff --git a/src/transformations/gridshift.cpp b/src/transformations/gridshift.cpp index 24c3bbe9bc9e..42390fb76fd0 100644 --- a/src/transformations/gridshift.cpp +++ b/src/transformations/gridshift.cpp @@ -5608,6 +5608,7 @@ static PJ_LP normalizeLongitude(const GenericShiftGrid *grid, const PJ_LPZ in, <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -6164,6 +6165,9 @@ static PJ_LP normalizeLongitude(const GenericShiftGrid *grid, const PJ_LPZ in, ======= const osgeo::proj::ExtentAndRes *&extentOut) { >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + const NS_PROJ::ExtentAndRes *&extentOut) { +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) PJ_LP normalized; normalized.lam = in.lam; normalized.phi = in.phi; @@ -6235,6 +6239,7 @@ PJ_LPZ gridshiftData::grid_apply_internal( <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -6791,6 +6796,9 @@ PJ_LPZ gridshiftData::grid_apply_internal( ======= const osgeo::proj::ExtentAndRes *extent; >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + const NS_PROJ::ExtentAndRes *extent; +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) PJ_LP normalized_in = normalizeLongitude(grid, in, extent); PJ_LPZ shift = grid_interpolate(ctx, type, normalized_in, grid); diff --git a/src/transformations/helmert.cpp b/src/transformations/helmert.cpp index c9f4d44bc778..f49a4056ac39 100644 --- a/src/transformations/helmert.cpp +++ b/src/transformations/helmert.cpp @@ -493,6 +493,7 @@ static void helmert_forward_4d (PJ_COORD &point, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -723,6 +724,8 @@ static void helmert_forward_4d (PJ_COORD &point, PJ *P) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) // Assigning in 2 steps avoids cppcheck warning // "Overlapping read/write of union is undefined behavior" // Cf https://github.com/OSGeo/PROJ/pull/3527#pullrequestreview-1233332710 @@ -758,6 +761,7 @@ static void helmert_forward_4d (PJ_COORD &point, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -1222,6 +1226,8 @@ static void helmert_forward_4d (PJ_COORD &point, PJ *P) { ======= point.xyz = helmert_forward_3d (point.lpz, P); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) } @@ -1280,6 +1286,7 @@ static void helmert_reverse_4d (PJ_COORD& point, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1510,6 +1517,8 @@ static void helmert_reverse_4d (PJ_COORD& point, PJ *P) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) // Assigning in 2 steps avoids cppcheck warning // "Overlapping read/write of union is undefined behavior" // Cf https://github.com/OSGeo/PROJ/pull/3527#pullrequestreview-1233332710 @@ -1545,6 +1554,7 @@ static void helmert_reverse_4d (PJ_COORD& point, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -2009,6 +2019,8 @@ static void helmert_reverse_4d (PJ_COORD& point, PJ *P) { ======= point.lpz = helmert_reverse_3d (point.xyz, P); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) } /* Arcsecond to radians */ diff --git a/src/transformations/hgridshift.cpp b/src/transformations/hgridshift.cpp index 2766dca49e87..8e245f86bc05 100644 --- a/src/transformations/hgridshift.cpp +++ b/src/transformations/hgridshift.cpp @@ -118,6 +118,7 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -348,6 +349,8 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) // Assigning in 2 steps avoids cppcheck warning // "Overlapping read/write of union is undefined behavior" // Cf https://github.com/OSGeo/PROJ/pull/3527#pullrequestreview-1233332710 @@ -383,6 +386,7 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -847,6 +851,8 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { ======= coo.xyz = forward_3d (coo.lpz, P); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) return; } @@ -894,6 +900,7 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1124,6 +1131,8 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) if (coo.lpzt.t < Q->t_epoch && Q->t_final > Q->t_epoch) { // Assigning in 2 steps avoids cppcheck warning // "Overlapping read/write of union is undefined behavior" @@ -1161,6 +1170,7 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 094787b30a (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -1649,6 +1659,8 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { if (coo.lpzt.t < Q->t_epoch && Q->t_final > Q->t_epoch) coo.xyz = forward_3d (coo.lpz, P); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) } static void reverse_4d(PJ_COORD& coo, PJ *P) { @@ -1699,6 +1711,7 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1929,6 +1942,8 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) // Assigning in 2 steps avoids cppcheck warning // "Overlapping read/write of union is undefined behavior" // Cf https://github.com/OSGeo/PROJ/pull/3527#pullrequestreview-1233332710 @@ -1964,6 +1979,7 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -2428,6 +2444,8 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { ======= coo.lpz = reverse_3d (coo.xyz, P); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) return; } @@ -2475,6 +2493,7 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -2705,6 +2724,8 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) if (coo.lpzt.t < Q->t_epoch && Q->t_final > Q->t_epoch) { // Assigning in 2 steps avoids cppcheck warning // "Overlapping read/write of union is undefined behavior" @@ -2742,6 +2763,7 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 094787b30a (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -3230,6 +3252,8 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { if (coo.lpzt.t < Q->t_epoch && Q->t_final > Q->t_epoch) coo.lpz = reverse_3d (coo.xyz, P); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) } static PJ *destructor (PJ *P, int errlev) { diff --git a/src/transformations/molodensky.cpp b/src/transformations/molodensky.cpp index 24b33bf48f01..3da13054796e 100644 --- a/src/transformations/molodensky.cpp +++ b/src/transformations/molodensky.cpp @@ -258,6 +258,7 @@ static PJ_XY forward_2d(PJ_LP lp, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -833,6 +834,11 @@ static PJ_XY forward_2d(PJ_LP lp, PJ *P) { >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + // Assigning in 2 steps avoids cppcheck warning + // "Overlapping read/write of union is undefined behavior" + // Cf https://github.com/OSGeo/PROJ/pull/3527#pullrequestreview-1233332710 +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) const auto xyz = forward_3d(point.lpz, P); point.xyz = xyz; @@ -888,6 +894,7 @@ static PJ_LP reverse_2d(PJ_XY xy, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1463,6 +1470,11 @@ static PJ_LP reverse_2d(PJ_XY xy, PJ *P) { >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + // Assigning in 2 steps avoids cppcheck warning + // "Overlapping read/write of union is undefined behavior" + // Cf https://github.com/OSGeo/PROJ/pull/3527#pullrequestreview-1233332710 +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) const auto lpz = reverse_3d(point.xyz, P); point.lpz = lpz; @@ -1540,6 +1552,7 @@ static void forward_4d(PJ_COORD& obs, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1770,6 +1783,8 @@ static void forward_4d(PJ_COORD& obs, PJ *P) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) // Assigning in 2 steps avoids cppcheck warning // "Overlapping read/write of union is undefined behavior" // Cf https://github.com/OSGeo/PROJ/pull/3527#pullrequestreview-1233332710 @@ -1805,6 +1820,7 @@ static void forward_4d(PJ_COORD& obs, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -2269,6 +2285,8 @@ static void forward_4d(PJ_COORD& obs, PJ *P) { ======= obs.xyz = forward_3d(obs.lpz, P); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) } @@ -2342,6 +2360,7 @@ static void reverse_4d(PJ_COORD& obs, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -2572,6 +2591,8 @@ static void reverse_4d(PJ_COORD& obs, PJ *P) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) // Assigning in 2 steps avoids cppcheck warning // "Overlapping read/write of union is undefined behavior" // Cf https://github.com/OSGeo/PROJ/pull/3527#pullrequestreview-1233332710 @@ -2607,6 +2628,7 @@ static void reverse_4d(PJ_COORD& obs, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -3071,6 +3093,8 @@ static void reverse_4d(PJ_COORD& obs, PJ *P) { ======= obs.lpz = reverse_3d(obs.xyz, P); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) } diff --git a/src/transformations/vgridshift.cpp b/src/transformations/vgridshift.cpp index c4a1244b6a6d..8af4d611312d 100644 --- a/src/transformations/vgridshift.cpp +++ b/src/transformations/vgridshift.cpp @@ -149,6 +149,7 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -379,6 +380,8 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) // Assigning in 2 steps avoids cppcheck warning // "Overlapping read/write of union is undefined behavior" // Cf https://github.com/OSGeo/PROJ/pull/3527#pullrequestreview-1233332710 @@ -414,6 +417,7 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -878,6 +882,8 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { ======= coo.xyz = forward_3d (coo.lpz, P); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) return; } @@ -925,6 +931,7 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1155,6 +1162,8 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) if (coo.lpzt.t < Q->t_epoch && Q->t_final > Q->t_epoch) { // Assigning in 2 steps avoids cppcheck warning // "Overlapping read/write of union is undefined behavior" @@ -1192,6 +1201,7 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 094787b30a (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -1680,6 +1690,8 @@ static void forward_4d(PJ_COORD& coo, PJ *P) { if (coo.lpzt.t < Q->t_epoch && Q->t_final > Q->t_epoch) coo.xyz = forward_3d (coo.lpz, P); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) } static void reverse_4d(PJ_COORD& coo, PJ *P) { @@ -1730,6 +1742,7 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -1960,6 +1973,8 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) // Assigning in 2 steps avoids cppcheck warning // "Overlapping read/write of union is undefined behavior" // Cf https://github.com/OSGeo/PROJ/pull/3527#pullrequestreview-1233332710 @@ -1995,6 +2010,7 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -2459,6 +2475,8 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { ======= coo.lpz = reverse_3d (coo.xyz, P); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) return; } @@ -2506,6 +2524,7 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -2736,6 +2755,8 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) if (coo.lpzt.t < Q->t_epoch && Q->t_final > Q->t_epoch) { // Assigning in 2 steps avoids cppcheck warning // "Overlapping read/write of union is undefined behavior" @@ -2773,6 +2794,7 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 094787b30a (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -3261,6 +3283,8 @@ static void reverse_4d(PJ_COORD& coo, PJ *P) { if (coo.lpzt.t < Q->t_epoch && Q->t_final > Q->t_epoch) coo.lpz = reverse_3d (coo.xyz, P); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) } static PJ *destructor (PJ *P, int errlev) { diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index 136dd595760c..2ac172b16690 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -1810,6 +1810,7 @@ expect -0.001790493 -0.000895247 <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> locationtech-main @@ -2640,6 +2641,14 @@ expect -0.001790493 -0.000895247 >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +# Azi, Sph*Ell +=============================================================================== + +------------------------------------------------------------------------------- +# Test material from Snyder p. 168, table 26. Repeat tests with ellispoid of +# flattening 1/200. +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) # Tests the equatorial aspect of the projection. ------------------------------------------------------------------------------- operation +proj=gnom +R=1 @@ -2726,6 +2735,7 @@ expect 0 90 <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -2956,6 +2966,8 @@ expect 0 90 >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ------------------------------------------------------------------------------- operation +proj=gnom +a=1 +rf=200 ------------------------------------------------------------------------------- @@ -3030,6 +3042,7 @@ expect 0 90 <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -3460,6 +3473,8 @@ expect 0 90 >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ------------------------------------------------------------------------------- # Test the northern polar aspect of the gnonomic projection @@ -3522,6 +3537,7 @@ expect failure errno coord_transfm_outside_projection_domain <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -3752,6 +3768,8 @@ expect failure errno coord_transfm_outside_projection_domain >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) operation +proj=gnom +a=1 +rf=200 +lat_0=90 ------------------------------------------------------------------------------- tolerance 0.1 mm @@ -3803,6 +3821,7 @@ expect failure errno coord_transfm_outside_projection_domain <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -4233,6 +4252,8 @@ expect failure errno coord_transfm_outside_projection_domain >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) # Test the southern polar aspect of the gnonomic projection ------------------------------------------------------------------------------- operation +proj=gnom +R=1 +lat_0=-90 @@ -4293,6 +4314,7 @@ expect failure errno coord_transfm_outside_projection_domain <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -4523,6 +4545,8 @@ expect failure errno coord_transfm_outside_projection_domain >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) operation +proj=gnom +a=1 +rf=200 +lat_0=-90 ------------------------------------------------------------------------------- tolerance 0.1 mm @@ -4574,6 +4598,7 @@ expect failure errno coord_transfm_outside_projection_domain <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -5004,6 +5029,8 @@ expect failure errno coord_transfm_outside_projection_domain >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) # Test the oblique aspect of the gnonomic projection ------------------------------------------------------------------------------- operation +proj=gnom +R=1 +lat_0=45 @@ -5064,6 +5091,7 @@ expect failure errno coord_transfm_outside_projection_domain <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -5294,6 +5322,8 @@ expect failure errno coord_transfm_outside_projection_domain >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ------------------------------------------------------------------------------- operation +proj=gnom +a=1 +rf=200 +lat_0=45 ------------------------------------------------------------------------------- @@ -5342,6 +5372,7 @@ expect failure errno coord_transfm_outside_projection_domain <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -5772,6 +5803,8 @@ expect failure errno coord_transfm_outside_projection_domain >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) =============================================================================== # Goode Homolosine # PCyl, Sph. diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp index 2cee77804c71..9eff66406756 100644 --- a/test/unit/test_c_api.cpp +++ b/test/unit/test_c_api.cpp @@ -7505,6 +7505,7 @@ TEST_F(CApi, proj_trans_bounds_ignore_inf) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -7735,6 +7736,8 @@ TEST_F(CApi, proj_trans_bounds_ignore_inf) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) // Before the ellipsoidal version of the gnomonic projection was // implemented the WGS84 ellipsoid was treated as a sphere of radius // 6378137m and the equator was the "horizon" for the projection with the @@ -7763,6 +7766,7 @@ TEST_F(CApi, proj_trans_bounds_ignore_inf) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -7927,6 +7931,9 @@ TEST_F(CApi, proj_trans_bounds_ignore_inf) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= + // -89178007.2 which was the projection of lat = -90d/(ndiv+1), lon = 180d. +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) // // With the implementation of the ellipsoidal gnonomic projection, the // horizon is now at lat = +0.3035d. @@ -7956,6 +7963,7 @@ TEST_F(CApi, proj_trans_bounds_ignore_inf) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 9b68b76b81 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -8833,17 +8841,24 @@ TEST_F(CApi, proj_trans_bounds_ignore_inf) { ======= ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + // now lat = -90+4.15*ndiv = -2.85d, lon = 180d for which y = -116576598.5. +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) int success = - proj_trans_bounds(m_ctxt, P, PJ_FWD, -180.0, -90.0, 180.0, 0.0, + proj_trans_bounds(m_ctxt, P, PJ_FWD, -180.0, -90.0, 180.0, 1.3, &out_left, &out_bottom, &out_right, &out_top, 21); EXPECT_TRUE(success == 1); EXPECT_NEAR(out_left, 0, 1); +<<<<<<< HEAD EXPECT_NEAR(out_bottom, -89178008, 1); <<<<<<< HEAD >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + EXPECT_NEAR(out_bottom, -116576598.5, 1); +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) EXPECT_NEAR(out_right, 0, 1); EXPECT_NEAR(out_top, 0, 1); } diff --git a/test/unit/test_crs.cpp b/test/unit/test_crs.cpp index 684a86a8b363..98b830293007 100644 --- a/test/unit/test_crs.cpp +++ b/test/unit/test_crs.cpp @@ -2660,6 +2660,7 @@ TEST(crs, projectedCRS_identify_db) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -3249,6 +3250,11 @@ TEST(crs, projectedCRS_identify_db) { ======= EXPECT_EQ(res.size(), 0U); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + EXPECT_EQ(res.size(), 1U); + EXPECT_EQ(res.front().first->getEPSGCode(), 2172); + EXPECT_EQ(res.front().second, 70); +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) } { // Existing code, but not matching content @@ -3306,6 +3312,7 @@ TEST(crs, projectedCRS_identify_db) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -3911,6 +3918,10 @@ TEST(crs, projectedCRS_identify_db) { EXPECT_EQ(res.front().first->getEPSGCode(), 32631); EXPECT_EQ(res.front().second, 25); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= + EXPECT_EQ(res.front().first->getEPSGCode(), 2172); + EXPECT_EQ(res.front().second, 70); +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) } { // Identify by exact name @@ -4572,6 +4583,7 @@ TEST(crs, projectedCRS_identify_db) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -4802,6 +4814,8 @@ TEST(crs, projectedCRS_identify_db) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) { // Identify from a pseudo WKT ESRI with has an AUTHORITY node that // points to another object. @@ -4858,6 +4872,7 @@ TEST(crs, projectedCRS_identify_db) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -5288,6 +5303,8 @@ TEST(crs, projectedCRS_identify_db) { >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) } // --------------------------------------------------------------------------- diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp index e17a705606c1..351ce2752b7c 100644 --- a/test/unit/test_io.cpp +++ b/test/unit/test_io.cpp @@ -12793,6 +12793,7 @@ TEST(io, projparse_cea_spherical) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -13023,6 +13024,8 @@ TEST(io, projparse_cea_spherical) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) const std::string input( "+proj=cea +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +R=6371228 +units=m " "+no_defs +type=crs"); @@ -13057,6 +13060,7 @@ TEST(io, projparse_cea_spherical) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 094787b30a (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -13545,6 +13549,8 @@ TEST(io, projparse_cea_spherical) { auto obj = PROJStringParser().createFromPROJString( "+proj=cea +R=6371228 +type=crs"); >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) auto crs = nn_dynamic_pointer_cast(obj); ASSERT_TRUE(crs != nullptr); EXPECT_EQ(crs->derivingConversion()->method()->getEPSGCode(), @@ -13592,6 +13598,7 @@ TEST(io, projparse_cea_spherical) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) @@ -13822,6 +13829,8 @@ TEST(io, projparse_cea_spherical) { >>>>>>> 6f78b76c12 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) EXPECT_EQ( crs->exportToPROJString( PROJStringFormatter::create(PROJStringFormatter::Convention::PROJ_4) @@ -13857,6 +13866,7 @@ TEST(io, projparse_cea_spherical) { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 938d194c93 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= @@ -14287,6 +14297,8 @@ TEST(io, projparse_cea_spherical) { >>>>>>> 885e4882b8 (Merge pull request #3524 from cffk/merid-update-fix) ======= >>>>>>> 0a2f6458d1 (Merge pull request #3524 from cffk/merid-update-fix) +======= +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) auto crs2 = ProjectedCRS::create( PropertyMap(), crs->baseCRS(), @@ -14875,8 +14887,12 @@ TEST(io, projparse_cea_spherical_on_ellipsoid) { >>>>>>> 26891e6f2b (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) ======= TEST(io, projparse_cea_spherical_on_ellipsoid) { +<<<<<<< HEAD std::string input("+proj=cea +R_A +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 " >>>>>>> e827708321 (Merge pull request #3523 from rouault/cleanup_aeqd_s_forward) +======= + std::string input("+proj=cea +R_A +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 " +>>>>>>> 9df6fd0323 (Fix build with -DPROJ_INTERNAL_CPP_NAMESPACE) "+ellps=WGS84 +units=m +no_defs +type=crs"); auto obj = PROJStringParser().createFromPROJString(input); auto crs = nn_dynamic_pointer_cast(obj);