[proj] 04/06: Drop patches, included upstream.
Bas Couwenberg
sebastic at debian.org
Wed Mar 21 15:58:09 UTC 2018
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository proj.
commit 41da7dd54e78a418c134e2dd43ef74c07d716fcf
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Wed Mar 21 16:49:51 2018 +0100
Drop patches, included upstream.
---
debian/changelog | 1 +
debian/patches/0001-Revert-fix-to-22.patch | 86 --
...t-transient-errors-are-returned-correctly.patch | 181 ---
.../Remove-angle-brackets-for-proj-headers.patch | 1227 --------------------
.../Remove-pj_-prefix-from-static-functions.patch | 652 -----------
debian/patches/pj_transform-height_unit.patch | 18 -
...-reintroduce-support-for-vertical-scaling.patch | 798 -------------
debian/patches/series | 6 -
8 files changed, 1 insertion(+), 2968 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index ab93f41..672e43c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
proj (5.0.1~rc1-1) UNRELEASED; urgency=medium
* New upstream release candidate.
+ * Drop patches, included upstream.
-- Bas Couwenberg <sebastic at debian.org> Wed, 21 Mar 2018 16:45:57 +0100
diff --git a/debian/patches/0001-Revert-fix-to-22.patch b/debian/patches/0001-Revert-fix-to-22.patch
deleted file mode 100644
index 32d2c36..0000000
--- a/debian/patches/0001-Revert-fix-to-22.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-Description: Revert fix to #22
- The fix in #22 solved the problem at hand and doing what was expected
- from the specified parameters. Unfortunately it also removed the slightly
- hacky "feature" that makes the web mercator work in pj_transform. The
- web mercator is special since the latitude is computed on the ellipsoid,
- but behaves as if it was defined on a sphere. Hence it is problematic to
- change the ellipsoid parameters when using the web mercator, even though
- that is the geodetically correct thing to do. The web mercator is used in
- more or less any web mapping application and is thus one of the most
- frequently used transformations in PROJ. This justifies re-introducing
- the minor bug reported in #22.
- .
- The problem will have to be taken care of properly when pj_transform
- is removed from the library in favour of the transformation pipelines
- based API.
-Author: Kristian Evers <kristianevers at gmail.com>
-Origin: https://github.com/OSGeo/proj.4/commit/f41fad3ac2bff401456f31dd3273e163ea7d09af
-
---- a/nad/proj_outIGNF.dist
-+++ b/nad/proj_outIGNF.dist
-@@ -1,16 +1,16 @@
- +init=./IGNF:NTFG +to +init=./IGNF:RGF93G
- 3.300866856 43.4477976569 0.0000 3d18'0.915"E 43d26'52.077"N 0.000
- +init=./IGNF:LAMBE +to +init=./IGNF:LAMB93
-- 600000.0000 2600545.4523 0.0000 652760.737 7033791.244 0.000
-+ 600000.0000 2600545.4523 0.0000 652760.737 7033791.243 0.000
- 135638.3592 2418760.4094 0.0000 187194.062 6855928.882 0.000
- 998137.3947 2413822.2844 0.0000 1049052.258 6843776.562 0.000
-- 600000.0000 2200000.0000 0.0000 649398.872 6633524.192 0.000
-+ 600000.0000 2200000.0000 0.0000 649398.872 6633524.191 0.000
- 311552.5340 1906457.4840 0.0000 358799.172 6342652.486 0.000
- 960488.4138 1910172.8812 0.0000 1007068.686 6340907.237 0.000
- 600000.0000 1699510.8340 0.0000 645204.279 6133556.746 0.000
--1203792.5981 626873.17210 0.0000 1238875.764 5057405.017 0.000
-+1203792.5981 626873.17210 0.0000 1238875.764 5057405.016 0.000
- +init=./IGNF:LAMBE +to +init=./IGNF:GEOPORTALFXX
-- 600000.0000 2600545.4523 0.0000 179040.148 5610495.276 0.000
-+ 600000.0000 2600545.4523 0.0000 179040.148 5610495.275 0.000
- 135638.3592 2418760.4094 0.0000 -303729.363 5410118.356 0.000
- 998137.3947 2413822.2844 0.0000 592842.792 5410120.554 0.000
- 600000.0000 2200000.0000 0.0000 179041.670 5209746.080 0.000
-@@ -37,4 +37,4 @@
- 2d20'11.7754730" 42d18'00.0824436" 0.0 260109.601 5009175.714 0.000
- 9d32'12.6680218" 41d24'00.3542556" 0.0 1061637.534 4889066.592 0.000
- +init=./IGNF:RGR92 +to +init=./IGNF:REUN47
--3356123.5400 1303218.3090 5247430.6050 3353421.833 1304074.314 5248935.606
-+3356123.5400 1303218.3090 5247430.6050 3353421.833 1304074.314 5248935.607
---- a/src/pj_transform.c
-+++ b/src/pj_transform.c
-@@ -748,32 +748,17 @@ int pj_datum_transform( PJ *srcdefn, PJ
- /* -------------------------------------------------------------------- */
- if( srcdefn->datum_type == PJD_GRIDSHIFT )
- {
-- const char* srcnadgrids = pj_param(srcdefn->ctx, srcdefn->params,"snadgrids").s;
--
- pj_apply_gridshift_2( srcdefn, 0, point_count, point_offset, x, y, z );
- CHECK_RETURN(srcdefn);
-
-- /* If the gridlist has either "@null" or "null" as its only */
-- /* grid we don't change the ellipsoid parameters, since the */
-- /* datum shift to WGS84 was not performed in practice. */
-- if ( srcnadgrids != NULL &&
-- strcmp("@null", srcnadgrids) && strcmp("null", srcnadgrids) ) {
-- src_a = SRS_WGS84_SEMIMAJOR;
-- src_es = SRS_WGS84_ESQUARED;
-- }
-+ src_a = SRS_WGS84_SEMIMAJOR;
-+ src_es = SRS_WGS84_ESQUARED;
- }
-
- if( dstdefn->datum_type == PJD_GRIDSHIFT )
- {
-- const char* dstnadgrids = pj_param(dstdefn->ctx, dstdefn->params,"snadgrids").s;
-- /* If the gridlist has either "@null" or "null" as its only */
-- /* grid we don't change the ellipsoid parameters, since the */
-- /* datum shift to WGS84 will not be performed. */
-- if ( dstnadgrids != NULL &&
-- strcmp("@null", dstnadgrids) && strcmp("null", dstnadgrids) ) {
-- dst_a = SRS_WGS84_SEMIMAJOR;
-- dst_es = SRS_WGS84_ESQUARED;
-- }
-+ dst_a = SRS_WGS84_SEMIMAJOR;
-+ dst_es = SRS_WGS84_ESQUARED;
- }
-
- /* ==================================================================== */
diff --git a/debian/patches/Make-sure-that-transient-errors-are-returned-correctly.patch b/debian/patches/Make-sure-that-transient-errors-are-returned-correctly.patch
deleted file mode 100644
index 9147142..0000000
--- a/debian/patches/Make-sure-that-transient-errors-are-returned-correctly.patch
+++ /dev/null
@@ -1,181 +0,0 @@
-Description: Make sure that transient errors are returned correctly
-Author: Kristian Evers <kristianevers at gmail.com>
-Origin: https://github.com/OSGeo/proj.4/commit/c4895fdf89254e4969f474355c28d67e7dc7e74d
-
---- a/src/pj_fwd.c
-+++ b/src/pj_fwd.c
-@@ -174,11 +174,22 @@ static PJ_COORD fwd_finalize (PJ *P, PJ_
- }
-
-
-+static PJ_COORD error_or_coord(PJ *P, PJ_COORD coord, int last_errno) {
-+ if (proj_errno(P))
-+ return proj_coord_error();
-+
-+ proj_errno_restore(P, last_errno);
-+ return coord;
-+}
-+
-
- XY pj_fwd(LP lp, PJ *P) {
-+ int last_errno;
- PJ_COORD coo = {{0,0,0,0}};
- coo.lp = lp;
-
-+ last_errno = proj_errno_reset(P);
-+
- if (!P->skip_fwd_prepare)
- coo = fwd_prepare (P, coo);
- if (HUGE_VAL==coo.v[0])
-@@ -200,15 +211,19 @@ XY pj_fwd(LP lp, PJ *P) {
-
- if (!P->skip_fwd_finalize)
- coo = fwd_finalize (P, coo);
-- return coo.xy;
-+
-+ return error_or_coord(P, coo, last_errno).xy;
- }
-
-
-
- XYZ pj_fwd3d(LPZ lpz, PJ *P) {
-+ int last_errno;
- PJ_COORD coo = {{0,0,0,0}};
- coo.lpz = lpz;
-
-+ last_errno = proj_errno_reset(P);
-+
- if (!P->skip_fwd_prepare)
- coo = fwd_prepare (P, coo);
- if (HUGE_VAL==coo.v[0])
-@@ -230,12 +245,15 @@ XYZ pj_fwd3d(LPZ lpz, PJ *P) {
-
- if (!P->skip_fwd_finalize)
- coo = fwd_finalize (P, coo);
-- return coo.xyz;
-+
-+ return error_or_coord(P, coo, last_errno).xyz;
- }
-
-
-
- PJ_COORD pj_fwd4d (PJ_COORD coo, PJ *P) {
-+ int last_errno = proj_errno_reset(P);
-+
- if (!P->skip_fwd_prepare)
- coo = fwd_prepare (P, coo);
- if (HUGE_VAL==coo.v[0])
-@@ -257,5 +275,6 @@ PJ_COORD pj_fwd4d (PJ_COORD coo, PJ *P)
-
- if (!P->skip_fwd_finalize)
- coo = fwd_finalize (P, coo);
-- return coo;
-+
-+ return error_or_coord(P, coo, last_errno);
- }
---- a/src/pj_inv.c
-+++ b/src/pj_inv.c
-@@ -172,11 +172,22 @@ static PJ_COORD inv_finalize (PJ *P, PJ_
- }
-
-
-+static PJ_COORD error_or_coord(PJ *P, PJ_COORD coord, int last_errno) {
-+ if (proj_errno(P))
-+ return proj_coord_error();
-+
-+ proj_errno_restore(P, last_errno);
-+ return coord;
-+}
-+
-
- LP pj_inv(XY xy, PJ *P) {
-+ int last_errno;
- PJ_COORD coo = {{0,0,0,0}};
- coo.xy = xy;
-
-+ last_errno = proj_errno_reset(P);
-+
- if (!P->skip_inv_prepare)
- coo = inv_prepare (P, coo);
- if (HUGE_VAL==coo.v[0])
-@@ -198,15 +209,19 @@ LP pj_inv(XY xy, PJ *P) {
-
- if (!P->skip_inv_finalize)
- coo = inv_finalize (P, coo);
-- return coo.lp;
-+
-+ return error_or_coord(P, coo, last_errno).lp;
- }
-
-
-
- LPZ pj_inv3d (XYZ xyz, PJ *P) {
-+ int last_errno;
- PJ_COORD coo = {{0,0,0,0}};
- coo.xyz = xyz;
-
-+ last_errno = proj_errno_reset(P);
-+
- if (!P->skip_inv_prepare)
- coo = inv_prepare (P, coo);
- if (HUGE_VAL==coo.v[0])
-@@ -228,12 +243,15 @@ LPZ pj_inv3d (XYZ xyz, PJ *P) {
-
- if (!P->skip_inv_finalize)
- coo = inv_finalize (P, coo);
-- return coo.lpz;
-+
-+ return error_or_coord(P, coo, last_errno).lpz;
- }
-
-
-
- PJ_COORD pj_inv4d (PJ_COORD coo, PJ *P) {
-+ int last_errno = proj_errno_reset(P);
-+
- if (!P->skip_inv_prepare)
- coo = inv_prepare (P, coo);
- if (HUGE_VAL==coo.v[0])
-@@ -255,5 +273,6 @@ PJ_COORD pj_inv4d (PJ_COORD coo, PJ *P)
-
- if (!P->skip_inv_finalize)
- coo = inv_finalize (P, coo);
-- return coo;
-+
-+ return error_or_coord(P, coo, last_errno);
- }
---- a/test/gie/4D-API_cs2cs-style.gie
-+++ b/test/gie/4D-API_cs2cs-style.gie
-@@ -186,4 +186,32 @@ tolerance 20 cm
- accept 7.438632495 46.951082877
- expect 2600000.0 1200000.0
- -------------------------------------------------------------------------------
-+
-+-------------------------------------------------------------------------------
-+Make sure that transient errors are returned correctly.
-+-------------------------------------------------------------------------------
-+operation +proj=geos +lon_0=0.00 +lat_0=0.00 +a=6378169.00 +b=6356583.80 +h=35785831.0
-+-------------------------------------------------------------------------------
-+accept 85.05493299 46.5261074
-+expect failure
-+
-+accept 85.05493299 46.5261074 0
-+expect failure
-+
-+accept 85.05493299 46.5261074 0 0
-+expect failure
-+
-+-------------------------------------------------------------------------------
-+Test that Google's Web Mercator works as intended (see #834 for details).
-+-------------------------------------------------------------------------------
-+operation proj=pipeline step init=epsg:26915 inv step init=epsg:3857
-+-------------------------------------------------------------------------------
-+tolerance 20 cm
-+accept 487147.594520173 4934316.46263998
-+expect -10370728.80 5552839.74
-+
-+accept 487147.594520173 4934316.46263998 0
-+expect -10370728.80 5552839.74 0
-+-------------------------------------------------------------------------------
-+
- </gie>
diff --git a/debian/patches/Remove-angle-brackets-for-proj-headers.patch b/debian/patches/Remove-angle-brackets-for-proj-headers.patch
deleted file mode 100644
index fe93738..0000000
--- a/debian/patches/Remove-angle-brackets-for-proj-headers.patch
+++ /dev/null
@@ -1,1227 +0,0 @@
-Description: Remove angle brackets for proj headers (#849)
- * Avoid using angle brackets for PROJ headers.
- .
- Switching from #include <proj.h> to #include "proj.h",
- and correspondingly for projects.h and proj_api.h,
- reduces the risk of accidentally picking up a system
- installed older version of the header while building
- a new version of PROJ.
-Author: Thomas Knudsen <busstoptaktik at users.noreply.github.com>
-Origin: https://github.com/OSGeo/proj.4/commit/2b143b4829f058fd98919e064b78a501c5110652
-
---- a/src/PJ_aea.c
-+++ b/src/PJ_aea.c
-@@ -28,7 +28,7 @@
- *****************************************************************************/
-
- #define PJ_LIB__
--#include <proj.h>
-+#include "proj.h"
- #include <errno.h>
- #include "projects.h"
-
---- a/src/PJ_aeqd.c
-+++ b/src/PJ_aeqd.c
-@@ -27,7 +27,7 @@
-
- #define PJ_LIB__
- #include "geodesic.h"
--#include <proj.h>
-+#include "proj.h"
- #include <errno.h>
- #include "projects.h"
-
---- a/src/PJ_airy.c
-+++ b/src/PJ_airy.c
-@@ -27,7 +27,7 @@
- *****************************************************************************/
-
- #define PJ_LIB__
--#include <proj.h>
-+#include "proj.h"
- #include <errno.h>
- #include "projects.h"
-
---- a/src/PJ_aitoff.c
-+++ b/src/PJ_aitoff.c
-@@ -29,7 +29,7 @@
- *****************************************************************************/
-
- #define PJ_LIB__
--#include <proj.h>
-+#include "proj.h"
- #include <errno.h>
- #include "projects.h"
-
---- a/src/PJ_bacon.c
-+++ b/src/PJ_bacon.c
-@@ -2,7 +2,7 @@
- # define EPS 1e-10
- #define PJ_LIB__
- #include <errno.h>
--#include <projects.h>
-+#include "projects.h"
-
-
- struct pj_opaque {
---- a/src/PJ_bipc.c
-+++ b/src/PJ_bipc.c
-@@ -1,5 +1,5 @@
- #define PJ_LIB__
--#include <proj.h>
-+#include "proj.h"
- #include <errno.h>
- #include "projects.h"
-
---- a/src/PJ_boggs.c
-+++ b/src/PJ_boggs.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- # include <errno.h>
--# include <projects.h>
-+# include "projects.h"
- PROJ_HEAD(boggs, "Boggs Eumorphic") "\n\tPCyl., no inv., Sph.";
- # define NITER 20
- # define EPS 1e-7
---- a/src/PJ_bonne.c
-+++ b/src/PJ_bonne.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(bonne, "Bonne (Werner lat_1=90)")
---- a/src/PJ_calcofi.c
-+++ b/src/PJ_calcofi.c
-@@ -1,5 +1,5 @@
- #define PJ_LIB__
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(calcofi,
-@@ -8,7 +8,7 @@ PROJ_HEAD(calcofi,
- #include <string.h>
- #include <stdio.h>
- #include <math.h>
--#include <proj_api.h>
-+#include "proj_api.h"
- #include <errno.h>
-
- /* Conversions for the California Cooperative Oceanic Fisheries Investigations
---- a/src/PJ_cc.c
-+++ b/src/PJ_cc.c
-@@ -1,5 +1,5 @@
- #define PJ_LIB__
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(cc, "Central Cylindrical") "\n\tCyl, Sph";
---- a/src/PJ_ccon.c
-+++ b/src/PJ_ccon.c
-@@ -22,7 +22,7 @@
-
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- #define EPS10 1e-10
---- a/src/PJ_cea.c
-+++ b/src/PJ_cea.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- struct pj_opaque {
---- a/src/PJ_chamb.c
-+++ b/src/PJ_chamb.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- typedef struct { double r, Az; } VECT;
---- a/src/PJ_collg.c
-+++ b/src/PJ_collg.c
-@@ -1,5 +1,5 @@
- #define PJ_LIB__
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(collg, "Collignon") "\n\tPCyl, Sph.";
---- a/src/PJ_comill.c
-+++ b/src/PJ_comill.c
-@@ -7,7 +7,7 @@ Port to PROJ.4 by Bojan Savric, 4 April
- */
-
- #define PJ_LIB__
--#include <projects.h>
-+#include "projects.h"
-
- PROJ_HEAD(comill, "Compact Miller") "\n\tCyl., Sph.";
-
---- a/src/PJ_crast.c
-+++ b/src/PJ_crast.c
-@@ -1,5 +1,5 @@
- #define PJ_LIB__
--# include <projects.h>
-+# include "projects.h"
-
- PROJ_HEAD(crast, "Craster Parabolic (Putnins P4)") "\n\tPCyl., Sph.";
-
---- a/src/PJ_deformation.c
-+++ b/src/PJ_deformation.c
-@@ -53,7 +53,7 @@ grid-values in units of mm/year in ENU-s
- ***********************************************************************/
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "proj_internal.h"
- #include "projects.h"
-
---- a/src/PJ_denoy.c
-+++ b/src/PJ_denoy.c
-@@ -1,5 +1,5 @@
- #define PJ_LIB__
--#include <projects.h>
-+#include "projects.h"
-
- PROJ_HEAD(denoy, "Denoyer Semi-Elliptical") "\n\tPCyl., no inv., Sph.";
-
---- a/src/PJ_eck2.c
-+++ b/src/PJ_eck2.c
-@@ -1,5 +1,5 @@
- #define PJ_LIB__
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(eck2, "Eckert II") "\n\tPCyl. Sph.";
---- a/src/PJ_eck4.c
-+++ b/src/PJ_eck4.c
-@@ -1,5 +1,5 @@
- #define PJ_LIB__
--#include <projects.h>
-+#include "projects.h"
-
- PROJ_HEAD(eck4, "Eckert IV") "\n\tPCyl, Sph.";
-
---- a/src/PJ_eqc.c
-+++ b/src/PJ_eqc.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- struct pj_opaque {
---- a/src/PJ_eqdc.c
-+++ b/src/PJ_eqdc.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- struct pj_opaque {
---- a/src/PJ_fahey.c
-+++ b/src/PJ_fahey.c
-@@ -1,5 +1,5 @@
- #define PJ_LIB__
--#include <projects.h>
-+#include "projects.h"
-
- PROJ_HEAD(fahey, "Fahey") "\n\tPcyl, Sph.";
-
---- a/src/PJ_fouc_s.c
-+++ b/src/PJ_fouc_s.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(fouc_s, "Foucaut Sinusoidal") "\n\tPCyl., Sph.";
---- a/src/PJ_gall.c
-+++ b/src/PJ_gall.c
-@@ -1,5 +1,5 @@
- #define PJ_LIB__
--#include <projects.h>
-+#include "projects.h"
-
- PROJ_HEAD(gall, "Gall (Gall Stereographic)") "\n\tCyl, Sph";
-
---- a/src/PJ_geoc.c
-+++ b/src/PJ_geoc.c
-@@ -27,7 +27,7 @@
- *****************************************************************************/
-
- #define PJ_LIB__
--#include <proj.h>
-+#include "proj.h"
- #include <errno.h>
- #include "projects.h"
-
---- a/src/PJ_geos.c
-+++ b/src/PJ_geos.c
-@@ -29,7 +29,7 @@
-
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- struct pj_opaque {
---- a/src/PJ_gn_sinu.c
-+++ b/src/PJ_gn_sinu.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(gn_sinu, "General Sinusoidal Series") "\n\tPCyl, Sph.\n\tm= n=";
---- a/src/PJ_gnom.c
-+++ b/src/PJ_gnom.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(gnom, "Gnomonic") "\n\tAzi, Sph.";
---- a/src/PJ_goode.c
-+++ b/src/PJ_goode.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(goode, "Goode Homolosine") "\n\tPCyl, Sph.";
---- a/src/PJ_hammer.c
-+++ b/src/PJ_hammer.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(hammer, "Hammer & Eckert-Greifendorff")
---- a/src/PJ_hatano.c
-+++ b/src/PJ_hatano.c
-@@ -1,5 +1,5 @@
- #define PJ_LIB__
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(hatano, "Hatano Asymmetrical Equal Area") "\n\tPCyl, Sph.";
---- a/src/PJ_healpix.c
-+++ b/src/PJ_healpix.c
-@@ -31,7 +31,7 @@
- # define PJ_LIB__
- # include <errno.h>
- # include "proj_internal.h"
--# include <proj.h>
-+# include "proj.h"
- # include "projects.h"
-
- PROJ_HEAD(healpix, "HEALPix") "\n\tSph., Ellps.";
---- a/src/PJ_imw_p.c
-+++ b/src/PJ_imw_p.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(imw_p, "International Map of the World Polyconic")
---- a/src/PJ_isea.c
-+++ b/src/PJ_isea.c
-@@ -1027,7 +1027,7 @@ isea_forward(struct isea_dgg *g, struct
-
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(isea, "Icosahedral Snyder Equal Area") "\n\tSph";
---- a/src/PJ_laea.c
-+++ b/src/PJ_laea.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(laea, "Lambert Azimuthal Equal Area") "\n\tAzi, Sph&Ell";
---- a/src/PJ_lagrng.c
-+++ b/src/PJ_lagrng.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(lagrng, "Lagrange") "\n\tMisc Sph, no inv.\n\tW=";
---- a/src/PJ_lcc.c
-+++ b/src/PJ_lcc.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(lcc, "Lambert Conformal Conic")
---- a/src/PJ_lcca.c
-+++ b/src/PJ_lcca.c
-@@ -47,7 +47,7 @@
-
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(lcca, "Lambert Conformal Conic Alternative")
---- a/src/PJ_loxim.c
-+++ b/src/PJ_loxim.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(loxim, "Loximuthal") "\n\tPCyl Sph";
---- a/src/PJ_lsat.c
-+++ b/src/PJ_lsat.c
-@@ -1,7 +1,7 @@
- /* based upon Snyder and Linck, USGS-NMD */
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(lsat, "Space oblique for LANDSAT")
---- a/src/PJ_mbtfpp.c
-+++ b/src/PJ_mbtfpp.c
-@@ -1,5 +1,5 @@
- #define PJ_LIB__
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(mbtfpp, "McBride-Thomas Flat-Polar Parabolic") "\n\tCyl., Sph.";
---- a/src/PJ_mbtfpq.c
-+++ b/src/PJ_mbtfpq.c
-@@ -1,5 +1,5 @@
- #define PJ_LIB__
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(mbtfpq, "McBryde-Thomas Flat-Polar Quartic") "\n\tCyl., Sph.";
---- a/src/PJ_merc.c
-+++ b/src/PJ_merc.c
-@@ -1,5 +1,5 @@
- #define PJ_LIB__
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(merc, "Mercator") "\n\tCyl, Sph&Ell\n\tlat_ts=";
---- a/src/PJ_misrsom.c
-+++ b/src/PJ_misrsom.c
-@@ -22,7 +22,7 @@
- /* based upon Snyder and Linck, USGS-NMD */
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(misrsom, "Space oblique for MISR")
---- a/src/PJ_molodensky.c
-+++ b/src/PJ_molodensky.c
-@@ -44,7 +44,7 @@
- ***********************************************************************/
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "proj_internal.h"
- #include "projects.h"
-
---- a/src/PJ_nsper.c
-+++ b/src/PJ_nsper.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- enum Mode {
---- a/src/PJ_ob_tran.c
-+++ b/src/PJ_ob_tran.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
- #include <string.h>
-
---- a/src/PJ_ocea.c
-+++ b/src/PJ_ocea.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <projects.h>
-+#include "projects.h"
-
- PROJ_HEAD(ocea, "Oblique Cylindrical Equal Area") "\n\tCyl, Sph"
- "lonc= alpha= or\n\tlat_1= lat_2= lon_1= lon_2=";
---- a/src/PJ_oea.c
-+++ b/src/PJ_oea.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(oea, "Oblated Equal Area") "\n\tMisc Sph\n\tn= m= theta=";
---- a/src/PJ_omerc.c
-+++ b/src/PJ_omerc.c
-@@ -23,7 +23,7 @@
- */
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(omerc, "Oblique Mercator")
---- a/src/PJ_ortho.c
-+++ b/src/PJ_ortho.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(ortho, "Orthographic") "\n\tAzi, Sph.";
---- a/src/PJ_patterson.c
-+++ b/src/PJ_patterson.c
-@@ -39,7 +39,7 @@
- */
-
- #define PJ_LIB__
--#include <projects.h>
-+#include "projects.h"
-
- PROJ_HEAD(patterson, "Patterson Cylindrical") "\n\tCyl.";
-
---- a/src/PJ_pipeline.c
-+++ b/src/PJ_pipeline.c
-@@ -95,8 +95,8 @@ Thomas Knudsen, thokn at sdfe.dk, 2016-05-2
- ********************************************************************************/
-
- #define PJ_LIB__
--#include <geodesic.h>
--#include <proj.h>
-+#include "geodesic.h"
-+#include "proj.h"
- #include "proj_internal.h"
- #include "projects.h"
-
---- a/src/PJ_poly.c
-+++ b/src/PJ_poly.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(poly, "Polyconic (American)")
---- a/src/PJ_putp3.c
-+++ b/src/PJ_putp3.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <projects.h>
-+#include "projects.h"
-
- struct pj_opaque {
- double A;
---- a/src/PJ_putp6.c
-+++ b/src/PJ_putp6.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <projects.h>
-+#include "projects.h"
-
- struct pj_opaque {
- double C_x, C_y, A, B, D;
---- a/src/PJ_robin.c
-+++ b/src/PJ_robin.c
-@@ -1,5 +1,5 @@
- #define PJ_LIB__
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(robin, "Robinson") "\n\tPCyl., Sph.";
---- a/src/PJ_sch.c
-+++ b/src/PJ_sch.c
-@@ -32,7 +32,7 @@
-
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
- #include "geocent.h"
-
---- a/src/PJ_sconics.c
-+++ b/src/PJ_sconics.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
-
---- a/src/PJ_somerc.c
-+++ b/src/PJ_somerc.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(somerc, "Swiss. Obl. Mercator") "\n\tCyl, Ell\n\tFor CH1903";
---- a/src/PJ_stere.c
-+++ b/src/PJ_stere.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(stere, "Stereographic") "\n\tAzi, Sph&Ell\n\tlat_ts=";
---- a/src/PJ_sterea.c
-+++ b/src/PJ_sterea.c
-@@ -25,7 +25,7 @@
- */
- #define PJ_LIB__
- #include <errno.h>
--#include <projects.h>
-+#include "projects.h"
-
-
- struct pj_opaque {
---- a/src/PJ_tcc.c
-+++ b/src/PJ_tcc.c
-@@ -1,5 +1,5 @@
- #define PJ_LIB__
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(tcc, "Transverse Central Cylindrical") "\n\tCyl, Sph, no inv.";
---- a/src/PJ_times.c
-+++ b/src/PJ_times.c
-@@ -30,7 +30,7 @@
- *****************************************************************************/
-
- #define PJ_LIB__
--#include <projects.h>
-+#include "projects.h"
-
- PROJ_HEAD(times, "Times") "\n\tCyl, Sph";
-
---- a/src/PJ_tmerc.c
-+++ b/src/PJ_tmerc.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(tmerc, "Transverse Mercator") "\n\tCyl, Sph&Ell";
---- a/src/PJ_tpeqd.c
-+++ b/src/PJ_tpeqd.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
-
---- a/src/PJ_urm5.c
-+++ b/src/PJ_urm5.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(urm5, "Urmaev V") "\n\tPCyl., Sph., no inv.\n\tn= q= alpha=";
---- a/src/PJ_urmfps.c
-+++ b/src/PJ_urmfps.c
-@@ -1,6 +1,6 @@
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(urmfps, "Urmaev Flat-Polar Sinusoidal") "\n\tPCyl, Sph.\n\tn=";
---- a/src/PJ_vandg.c
-+++ b/src/PJ_vandg.c
-@@ -1,5 +1,5 @@
- #define PJ_LIB__
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- PROJ_HEAD(vandg, "van der Grinten (I)") "\n\tMisc Sph";
---- a/src/aasincos.c
-+++ b/src/aasincos.c
-@@ -1,5 +1,5 @@
- /* arc sin, cosine, tan2 and sqrt that will NOT fail */
--#include <projects.h>
-+#include "projects.h"
- #define ONE_TOL 1.00000000000001
- #define ATOL 1e-50
-
---- a/src/bch2bps.c
-+++ b/src/bch2bps.c
-@@ -1,5 +1,5 @@
- /* convert bivariate w Chebyshev series to w Power series */
--#include <projects.h>
-+#include "projects.h"
- /* basic support procedures */
- static void /* clear vector to zero */
- clear(projUV *p, int n) { static const projUV c = {0., 0.}; while (n--) *p++ = c; }
---- a/src/bchgen.c
-+++ b/src/bchgen.c
-@@ -1,5 +1,5 @@
- /* generate double bivariate Chebychev polynomial */
--#include <projects.h>
-+#include "projects.h"
- int
- bchgen(projUV a, projUV b, int nu, int nv, projUV **f, projUV(*func)(projUV)) {
- int i, j, k;
---- a/src/biveval.c
-+++ b/src/biveval.c
-@@ -1,5 +1,5 @@
- /* procedures for evaluating Tseries */
--# include <projects.h>
-+# include "projects.h"
- # define NEAR_ONE 1.00001
- static double ceval(struct PW_COEF *C, int n, projUV w, projUV w2) {
- double d=0, dd=0, vd, vdd, tmp, *c;
---- a/src/cct.c
-+++ b/src/cct.c
-@@ -77,7 +77,7 @@ Thomas Knudsen, thokn at sdfe.dk, 2016-05-2
- #include <stdlib.h>
- #include <string.h>
-
--#include <proj.h>
-+#include "proj.h"
- #include "proj_internal.h"
- #include "projects.h"
- #include "optargpm.h"
---- a/src/dmstor.c
-+++ b/src/dmstor.c
-@@ -1,5 +1,5 @@
- /* Convert DMS string to radians */
--#include <projects.h>
-+#include "projects.h"
- #include <string.h>
- #include <ctype.h>
-
---- a/src/emess.c
-+++ b/src/emess.c
-@@ -14,7 +14,7 @@
- #include <stdarg.h>
- #include <errno.h>
- #include <string.h>
--#include <proj_api.h>
-+#include "proj_api.h"
- #define EMESS_ROUTINE
- #include "emess.h"
- void
---- a/src/gie.c
-+++ b/src/gie.c
-@@ -112,7 +112,7 @@ Thomas Knudsen, thokn at sdfe.dk, 2017-10-0
- #include <stdlib.h>
- #include <string.h>
-
--#include <proj.h>
-+#include "proj.h"
- #include "proj_internal.h"
- #include "projects.h"
-
---- a/src/mk_cheby.c
-+++ b/src/mk_cheby.c
-@@ -1,4 +1,4 @@
--#include <projects.h>
-+#include "projects.h"
- static void /* sum coefficients less than res */
- eval(projUV **w, int nu, int nv, double res, projUV *resid) {
- int i, j;
---- a/src/nad_init.c
-+++ b/src/nad_init.c
-@@ -27,7 +27,7 @@
-
- #define PJ_LIB__
-
--#include <projects.h>
-+#include "projects.h"
- #include <stdio.h>
- #include <errno.h>
- #include <string.h>
---- a/src/nad_intr.c
-+++ b/src/nad_intr.c
-@@ -1,6 +1,6 @@
- /* Determine nad table correction value */
- #define PJ_LIB__
--#include <projects.h>
-+#include "projects.h"
- LP
- nad_intr(LP t, struct CTABLE *ct) {
- LP val, frct;
---- a/src/pj_auth.c
-+++ b/src/pj_auth.c
-@@ -1,5 +1,5 @@
- /* determine latitude from authalic latitude */
--#include <projects.h>
-+#include "projects.h"
- # define P00 .33333333333333333333 /* 1 / 3 */
- # define P01 .17222222222222222222 /* 31 / 180 */
- # define P02 .10257936507936507937 /* 517 / 5040 */
---- a/src/pj_ctx.c
-+++ b/src/pj_ctx.c
-@@ -25,7 +25,7 @@
- * DEALINGS IN THE SOFTWARE.
- *****************************************************************************/
-
--#include <projects.h>
-+#include "projects.h"
- #include <string.h>
- #include <errno.h>
-
---- a/src/pj_datum_set.c
-+++ b/src/pj_datum_set.c
-@@ -26,7 +26,7 @@
- *****************************************************************************/
-
- #include <errno.h>
--#include <projects.h>
-+#include "projects.h"
- #include <string.h>
-
- /* SEC_TO_RAD = Pi/180/3600 */
---- a/src/pj_datums.c
-+++ b/src/pj_datums.c
-@@ -28,7 +28,7 @@
- #include "proj.h"
-
- #define PJ_DATUMS__
--#include <projects.h>
-+#include "projects.h"
-
- /*
- * The ellipse code must match one from pj_ellps.c. The datum id should
---- a/src/pj_ell_set.c
-+++ b/src/pj_ell_set.c
-@@ -1,7 +1,7 @@
- /* set ellipsoid parameters a and es */
- #include <string.h>
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "proj_internal.h"
- #include "projects.h"
-
---- a/src/pj_errno.c
-+++ b/src/pj_errno.c
-@@ -1,6 +1,6 @@
- /* For full ANSI compliance of global variable */
-
--#include <projects.h>
-+#include "projects.h"
-
- C_NAMESPACE_VAR int pj_errno = 0;
-
---- a/src/pj_factors.c
-+++ b/src/pj_factors.c
-@@ -1,6 +1,6 @@
- /* projection scale factors */
- #define PJ_LIB__
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- #include <errno.h>
---- a/src/pj_fileapi.c
-+++ b/src/pj_fileapi.c
-@@ -27,7 +27,7 @@
- *****************************************************************************/
-
- #include <errno.h>
--#include <projects.h>
-+#include "projects.h"
- #include <string.h>
-
- static PAFile pj_stdio_fopen(projCtx ctx, const char *filename,
---- a/src/pj_gauss.c
-+++ b/src/pj_gauss.c
-@@ -24,7 +24,7 @@
- ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
- #define PJ_LIB__
--#include <projects.h>
-+#include "projects.h"
-
- #define MAX_ITER 20
-
---- a/src/pj_gc_reader.c
-+++ b/src/pj_gc_reader.c
-@@ -28,7 +28,7 @@
- #define PJ_LIB__
-
- #include <errno.h>
--#include <projects.h>
-+#include "projects.h"
- #include <string.h>
- #include <ctype.h>
-
---- a/src/pj_geocent.c
-+++ b/src/pj_geocent.c
-@@ -28,7 +28,7 @@
- *****************************************************************************/
-
- #define PJ_LIB__
--#include <projects.h>
-+#include "projects.h"
-
- PROJ_HEAD(geocent, "Geocentric") "\n\t";
-
---- a/src/pj_gridcatalog.c
-+++ b/src/pj_gridcatalog.c
-@@ -27,7 +27,7 @@
-
- #define PJ_LIB__
-
--#include <projects.h>
-+#include "projects.h"
- #include <string.h>
- #include <assert.h>
-
---- a/src/pj_gridlist.c
-+++ b/src/pj_gridlist.c
-@@ -29,7 +29,7 @@
- #define PJ_LIB__
-
- #include <errno.h>
--#include <projects.h>
-+#include "projects.h"
- #include <string.h>
- #include <math.h>
-
---- a/src/pj_init.c
-+++ b/src/pj_init.c
-@@ -30,12 +30,12 @@
-
-
- #define PJ_LIB__
--#include <geodesic.h>
-+#include "geodesic.h"
- #include <stdio.h>
- #include <string.h>
- #include <errno.h>
- #include <ctype.h>
--#include <proj.h>
-+#include "proj.h"
- #include "proj_internal.h"
- #include "projects.h"
-
---- a/src/pj_initcache.c
-+++ b/src/pj_initcache.c
-@@ -25,7 +25,7 @@
- * DEALINGS IN THE SOFTWARE.
- *****************************************************************************/
-
--#include <projects.h>
-+#include "projects.h"
- #include <string.h>
-
- static int cache_count = 0;
---- a/src/pj_internal.c
-+++ b/src/pj_internal.c
-@@ -33,7 +33,7 @@
- #include <stdarg.h>
- #include <errno.h>
-
--#include <geodesic.h>
-+#include "geodesic.h"
- #include "proj_internal.h"
- #include "projects.h"
-
---- a/src/pj_log.c
-+++ b/src/pj_log.c
-@@ -26,7 +26,7 @@
- *****************************************************************************/
-
- #include "proj.h"
--#include <projects.h>
-+#include "projects.h"
- #include <string.h>
- #include <stdarg.h>
-
---- a/src/pj_malloc.c
-+++ b/src/pj_malloc.c
-@@ -40,7 +40,7 @@
- ** projection system memory allocation/deallocation call with custom
- ** application procedures. */
-
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
- #include <errno.h>
-
---- a/src/pj_mlfn.c
-+++ b/src/pj_mlfn.c
-@@ -1,4 +1,4 @@
--#include <projects.h>
-+#include "projects.h"
- /* meridional distance for ellipsoid and inverse
- ** 8th degree - accurate to < 1e-5 meters when used in conjunction
- ** with typical major axis values.
---- a/src/pj_msfn.c
-+++ b/src/pj_msfn.c
-@@ -1,6 +1,6 @@
- /* determine constant small m */
- #include <math.h>
--#include <projects.h>
-+#include "projects.h"
- double
- pj_msfn(double sinphi, double cosphi, double es) {
- return (cosphi / sqrt (1. - es * sinphi * sinphi));
---- a/src/pj_mutex.c
-+++ b/src/pj_mutex.c
-@@ -36,9 +36,9 @@
-
- #ifndef _WIN32
- #include "proj_config.h"
--#include <projects.h>
-+#include "projects.h"
- #else
--#include <proj_api.h>
-+#include "proj_api.h"
- #endif
-
- /* on win32 we always use win32 mutexes, even if pthreads are available */
---- a/src/pj_open_lib.c
-+++ b/src/pj_open_lib.c
-@@ -30,7 +30,7 @@
-
- #define PJ_LIB__
- #include "proj_internal.h"
--#include <projects.h>
-+#include "projects.h"
- #include <stdio.h>
- #include <string.h>
- #include <errno.h>
---- a/src/pj_phi2.c
-+++ b/src/pj_phi2.c
-@@ -1,5 +1,5 @@
- /* determine latitude angle phi-2 */
--#include <projects.h>
-+#include "projects.h"
-
- #define TOL 1.0e-10
- #define N_ITER 15
---- a/src/pj_pr_list.c
-+++ b/src/pj_pr_list.c
-@@ -1,5 +1,5 @@
- /* print projection's list of parameters */
--#include <projects.h>
-+#include "projects.h"
- #include <stdio.h>
- #include <string.h>
- #define LINE_LEN 72
---- a/src/pj_qsfn.c
-+++ b/src/pj_qsfn.c
-@@ -1,6 +1,6 @@
- /* determine small q */
- #include <math.h>
--#include <projects.h>
-+#include "projects.h"
-
- # define EPSILON 1.0e-7
-
---- a/src/pj_release.c
-+++ b/src/pj_release.c
-@@ -1,6 +1,6 @@
- /* <<< Release Notice for library >>> */
-
--#include <projects.h>
-+#include "projects.h"
-
- char const pj_release[]="Rel. 5.0.0, March 1st, 2018";
-
---- a/src/pj_tsfn.c
-+++ b/src/pj_tsfn.c
-@@ -1,6 +1,6 @@
- /* determine small t */
- #include <math.h>
--#include <projects.h>
-+#include "projects.h"
-
- double pj_tsfn(double phi, double sinphi, double e) {
- double denominator;
---- a/src/pj_units.c
-+++ b/src/pj_units.c
-@@ -3,7 +3,7 @@
- #include "proj.h"
-
- #define PJ_UNITS__
--#include <projects.h>
-+#include "projects.h"
-
- /* Field 2 that contains the multiplier to convert named units to meters
- ** may be expressed by either a simple floating point constant or a
---- a/src/pj_utils.c
-+++ b/src/pj_utils.c
-@@ -28,7 +28,7 @@
-
- #define PJ_LIB__
-
--#include <projects.h>
-+#include "projects.h"
- #include <string.h>
- #include <math.h>
-
---- a/src/pj_zpoly1.c
-+++ b/src/pj_zpoly1.c
-@@ -1,5 +1,5 @@
- /* evaluate complex polynomial */
--#include <projects.h>
-+#include "projects.h"
- /* note: coefficients are always from C_1 to C_n
- ** i.e. C_0 == (0., 0)
- ** n should always be >= 1 though no checks are made
---- a/src/proj_4D_api.c
-+++ b/src/proj_4D_api.c
-@@ -28,7 +28,7 @@
- *****************************************************************************/
- #include <stddef.h>
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "proj_internal.h"
- #include "projects.h"
- #include "geodesic.h"
---- a/src/proj_etmerc.c
-+++ b/src/proj_etmerc.c
-@@ -42,7 +42,7 @@
- #define PJ_LIB__
-
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
-
---- a/src/proj_mdist.c
-+++ b/src/proj_mdist.c
-@@ -28,7 +28,7 @@
- ** Precision commensurate with double precision.
- */
- #define PJ_LIB__
--#include <projects.h>
-+#include "projects.h"
- #define MAX_ITER 20
- #define TOL 1e-14
-
---- a/src/proj_rouss.c
-+++ b/src/proj_rouss.c
-@@ -25,7 +25,7 @@
- */
- #define PJ_LIB__
- #include <errno.h>
--#include <proj.h>
-+#include "proj.h"
- #include "projects.h"
-
- struct pj_opaque {
---- a/src/rtodms.c
-+++ b/src/rtodms.c
-@@ -1,5 +1,5 @@
- /* Convert radian argument to DMS ascii format */
--#include <projects.h>
-+#include "projects.h"
- #include <stdio.h>
- #include <string.h>
- /*
---- a/src/test228.c
-+++ b/src/test228.c
-@@ -1,4 +1,4 @@
--#include <proj_api.h>
-+#include "proj_api.h"
- #include <stdio.h> /* for printf declaration */
-
-
---- a/src/vector1.c
-+++ b/src/vector1.c
-@@ -1,6 +1,6 @@
- /* make storage for one and two dimensional matricies */
- #include <stdlib.h>
--#include <projects.h>
-+#include "projects.h"
- void * /* one dimension array */
- vector1(int nvals, int size) { return((void *)pj_malloc(size * nvals)); }
- void /* free 2D array */
diff --git a/debian/patches/Remove-pj_-prefix-from-static-functions.patch b/debian/patches/Remove-pj_-prefix-from-static-functions.patch
deleted file mode 100644
index a2d605a..0000000
--- a/debian/patches/Remove-pj_-prefix-from-static-functions.patch
+++ /dev/null
@@ -1,652 +0,0 @@
-Description: Remove 'pj_' prefix from static functions
- Functions should only be prefixed with 'pj_' when they can be used in
- other parts of the code base and not just within a single file.
- .
- Takes care of the last step in #675.
-Author: Kristian Evers <kristianevers at gmail.com>
-Origin: https://github.com/OSGeo/proj.4/commit/9312b5c1470147660f0dde97bb4007c826bcd1cd
-
---- a/src/PJ_healpix.c
-+++ b/src/PJ_healpix.c
-@@ -71,7 +71,7 @@ static const double rot[7][2][2] = ROT;
- * @param v the parameter whose sign is returned.
- * @return 1 for positive number, -1 for negative, and 0 for zero.
- **/
--static double pj_sign (double v) {
-+static double sign (double v) {
- return v > 0 ? 1 : (v < 0 ? -1 : 0);
- }
-
-@@ -236,7 +236,7 @@ static double auth_lat(PJ *P, double alp
-
- if (fabs(ratio) > 1) {
- /* Rounding error. */
-- ratio = pj_sign(ratio);
-+ ratio = sign(ratio);
- }
- return asin(ratio);
- } else {
-@@ -269,7 +269,7 @@ static XY healpix_sphere(LP lp) {
- }
- lamc = -3*M_FORTPI + M_HALFPI*cn;
- xy.x = lamc + (lam - lamc)*sigma;
-- xy.y = pj_sign(phi)*M_FORTPI*(2 - sigma);
-+ xy.y = sign(phi)*M_FORTPI*(2 - sigma);
- }
- return xy;
- }
-@@ -297,10 +297,10 @@ static LP healpix_sphere_inverse(XY xy)
- xc = -3*M_FORTPI + M_HALFPI*cn;
- tau = 2.0 - 4*fabs(y)/M_PI;
- lp.lam = xc + (x - xc)/tau;
-- lp.phi = pj_sign(y)*asin(1.0 - pow(tau, 2)/3.0);
-+ lp.phi = sign(y)*asin(1.0 - pow(tau, 2)/3.0);
- } else {
- lp.lam = -M_PI;
-- lp.phi = pj_sign(y)*M_HALFPI;
-+ lp.phi = sign(y)*M_HALFPI;
- }
- return (lp);
- }
---- a/src/gie.c
-+++ b/src/gie.c
-@@ -579,9 +579,9 @@ either a conversion or a transformation)
-
-
-
--static int pj_unitconvert_selftest (void);
--static int pj_cart_selftest (void);
--static int pj_horner_selftest (void);
-+static int unitconvert_selftest (void);
-+static int cart_selftest (void);
-+static int horner_selftest (void);
-
- /*****************************************************************************/
- static int builtins (const char *args) {
-@@ -598,26 +598,26 @@ using the "builtins" command verb.
- T.op_ok = 0;
- T.op_ko = 0;
- T.op_skip = 0;
-- i = pj_unitconvert_selftest ();
-+ i = unitconvert_selftest ();
- if (i!=0) {
-- fprintf (T.fout, "pj_unitconvert_selftest fails with %d\n", i);
-+ fprintf (T.fout, "unitconvert_selftest fails with %d\n", i);
- another_failing_builtin();
- }
- else
- another_succeeding_builtin ();
-
-
-- i = pj_cart_selftest ();
-+ i = cart_selftest ();
- if (i!=0) {
-- fprintf (T.fout, "pj_cart_selftest fails with %d\n", i);
-+ fprintf (T.fout, "cart_selftest fails with %d\n", i);
- another_failing_builtin();
- }
- else
- another_succeeding_builtin ();
-
-- i = pj_horner_selftest ();
-+ i = horner_selftest ();
- if (i!=0) {
-- fprintf (T.fout, "pj_horner_selftest fails with %d\n", i);
-+ fprintf (T.fout, "horner_selftest fails with %d\n", i);
- another_failing_builtin();
- }
- else
-@@ -1473,7 +1473,7 @@ static const char sb_utm32[] = {
- " +inv_c=6.13342118787027e+06,4.94690181709311e+05,9.99824464710368e-01,2.82279070814774e-02,7.66123542220864e-11,1.78425334628927e-09,-1.05584823306400e-14,-3.32554258683744e-15"
- };
-
--static int pj_horner_selftest (void) {
-+static int horner_selftest (void) {
- PJ *P;
- PJ_COORD a, b, c;
- double dist;
-@@ -1539,7 +1539,7 @@ static int pj_horner_selftest (void) {
-
-
- /* Testing quite a bit of the pj_obs_api as a side effect (inspired by pj_obs_api_test.c) */
--static int pj_cart_selftest (void) {
-+static int cart_selftest (void) {
- PJ_CONTEXT *ctx;
- PJ *P;
- PJ_COORD a, b, obs[2];
-@@ -1968,7 +1968,7 @@ static int test_time(const char* args, d
- return ret;
- }
-
--static int pj_unitconvert_selftest (void) {
-+static int unitconvert_selftest (void) {
- int ret = 0;
- char args1[] = "+proj=unitconvert +t_in=decimalyear +t_out=decimalyear";
- double in1 = 2004.25;
---- a/src/pj_apply_vgridshift.c
-+++ b/src/pj_apply_vgridshift.c
-@@ -33,7 +33,7 @@
- #include "proj_internal.h"
- #include "projects.h"
-
--static double pj_read_vgrid_value( PJ *defn, LP input, int *gridlist_count_p, PJ_GRIDINFO **tables, struct CTABLE *ct) {
-+static double read_vgrid_value( PJ *defn, LP input, int *gridlist_count_p, PJ_GRIDINFO **tables, struct CTABLE *ct) {
- int itable = 0;
- double value = HUGE_VAL;
- double grid_x, grid_y;
-@@ -180,7 +180,7 @@ int pj_apply_vgridshift( PJ *defn, const
- input.phi = y[io];
- input.lam = x[io];
-
-- value = pj_read_vgrid_value(defn, input, gridlist_count_p, tables, &ct);
-+ value = read_vgrid_value(defn, input, gridlist_count_p, tables, &ct);
-
- if( inverse )
- z[io] -= value;
-@@ -286,7 +286,7 @@ double proj_vgrid_value(PJ *P, LP lp){
- double value;
- memset(&used_grid, 0, sizeof(struct CTABLE));
-
-- value = pj_read_vgrid_value(P, lp, &(P->vgridlist_geoid_count), P->vgridlist_geoid, &used_grid);
-+ value = read_vgrid_value(P, lp, &(P->vgridlist_geoid_count), P->vgridlist_geoid, &used_grid);
- proj_log_trace(P, "proj_vgrid_value: (%f, %f) = %f", lp.lam*RAD_TO_DEG, lp.phi*RAD_TO_DEG, value);
-
- return value;
---- a/src/pj_fileapi.c
-+++ b/src/pj_fileapi.c
-@@ -30,20 +30,20 @@
- #include "projects.h"
- #include <string.h>
-
--static PAFile pj_stdio_fopen(projCtx ctx, const char *filename,
-+static PAFile stdio_fopen(projCtx ctx, const char *filename,
- const char *access);
--static size_t pj_stdio_fread(void *buffer, size_t size, size_t nmemb,
-+static size_t stdio_fread(void *buffer, size_t size, size_t nmemb,
- PAFile file);
--static int pj_stdio_fseek(PAFile file, long offset, int whence);
--static long pj_stdio_ftell(PAFile file);
--static void pj_stdio_fclose(PAFile file);
-+static int stdio_fseek(PAFile file, long offset, int whence);
-+static long stdio_ftell(PAFile file);
-+static void stdio_fclose(PAFile file);
-
- static projFileAPI default_fileapi = {
-- pj_stdio_fopen,
-- pj_stdio_fread,
-- pj_stdio_fseek,
-- pj_stdio_ftell,
-- pj_stdio_fclose
-+ stdio_fopen,
-+ stdio_fread,
-+ stdio_fseek,
-+ stdio_ftell,
-+ stdio_fclose
- };
-
- typedef struct {
-@@ -61,10 +61,10 @@ projFileAPI *pj_get_default_fileapi(void
- }
-
- /************************************************************************/
--/* pj_stdio_fopen() */
-+/* stdio_fopen() */
- /************************************************************************/
-
--static PAFile pj_stdio_fopen(projCtx ctx, const char *filename,
-+static PAFile stdio_fopen(projCtx ctx, const char *filename,
- const char *access)
- {
- stdio_pafile *pafile;
-@@ -90,10 +90,10 @@ static PAFile pj_stdio_fopen(projCtx ctx
- }
-
- /************************************************************************/
--/* pj_stdio_fread() */
-+/* stdio_fread() */
- /************************************************************************/
-
--static size_t pj_stdio_fread(void *buffer, size_t size, size_t nmemb,
-+static size_t stdio_fread(void *buffer, size_t size, size_t nmemb,
- PAFile file)
- {
- stdio_pafile *pafile = (stdio_pafile *) file;
-@@ -101,27 +101,27 @@ static size_t pj_stdio_fread(void *buffe
- }
-
- /************************************************************************/
--/* pj_stdio_fseek() */
-+/* stdio_fseek() */
- /************************************************************************/
--static int pj_stdio_fseek(PAFile file, long offset, int whence)
-+static int stdio_fseek(PAFile file, long offset, int whence)
- {
- stdio_pafile *pafile = (stdio_pafile *) file;
- return fseek(pafile->fp, offset, whence);
- }
-
- /************************************************************************/
--/* pj_stdio_ftell() */
-+/* stdio_ftell() */
- /************************************************************************/
--static long pj_stdio_ftell(PAFile file)
-+static long stdio_ftell(PAFile file)
- {
- stdio_pafile *pafile = (stdio_pafile *) file;
- return ftell(pafile->fp);
- }
-
- /************************************************************************/
--/* pj_stdio_fclose() */
-+/* stdio_fclose() */
- /************************************************************************/
--static void pj_stdio_fclose(PAFile file)
-+static void stdio_fclose(PAFile file)
- {
- stdio_pafile *pafile = (stdio_pafile *) file;
- fclose(pafile->fp);
---- a/src/pj_fwd.c
-+++ b/src/pj_fwd.c
-@@ -36,7 +36,7 @@
- #define OUTPUT_UNITS P->right
-
-
--static PJ_COORD pj_fwd_prepare (PJ *P, PJ_COORD coo) {
-+static PJ_COORD fwd_prepare (PJ *P, PJ_COORD coo) {
- if (HUGE_VAL==coo.v[0])
- return proj_coord_error ();
-
-@@ -100,7 +100,7 @@ static PJ_COORD pj_fwd_prepare (PJ *P, P
-
-
-
--static PJ_COORD pj_fwd_finalize (PJ *P, PJ_COORD coo) {
-+static PJ_COORD fwd_finalize (PJ *P, PJ_COORD coo) {
-
- switch (OUTPUT_UNITS) {
-
-@@ -180,7 +180,7 @@ XY pj_fwd(LP lp, PJ *P) {
- coo.lp = lp;
-
- if (!P->skip_fwd_prepare)
-- coo = pj_fwd_prepare (P, coo);
-+ coo = fwd_prepare (P, coo);
- if (HUGE_VAL==coo.v[0])
- return proj_coord_error ().xy;
-
-@@ -199,7 +199,7 @@ XY pj_fwd(LP lp, PJ *P) {
- return proj_coord_error ().xy;
-
- if (!P->skip_fwd_finalize)
-- coo = pj_fwd_finalize (P, coo);
-+ coo = fwd_finalize (P, coo);
- return coo.xy;
- }
-
-@@ -210,7 +210,7 @@ XYZ pj_fwd3d(LPZ lpz, PJ *P) {
- coo.lpz = lpz;
-
- if (!P->skip_fwd_prepare)
-- coo = pj_fwd_prepare (P, coo);
-+ coo = fwd_prepare (P, coo);
- if (HUGE_VAL==coo.v[0])
- return proj_coord_error ().xyz;
-
-@@ -229,7 +229,7 @@ XYZ pj_fwd3d(LPZ lpz, PJ *P) {
- return proj_coord_error ().xyz;
-
- if (!P->skip_fwd_finalize)
-- coo = pj_fwd_finalize (P, coo);
-+ coo = fwd_finalize (P, coo);
- return coo.xyz;
- }
-
-@@ -237,7 +237,7 @@ XYZ pj_fwd3d(LPZ lpz, PJ *P) {
-
- PJ_COORD pj_fwd4d (PJ_COORD coo, PJ *P) {
- if (!P->skip_fwd_prepare)
-- coo = pj_fwd_prepare (P, coo);
-+ coo = fwd_prepare (P, coo);
- if (HUGE_VAL==coo.v[0])
- return proj_coord_error ();
-
-@@ -256,6 +256,6 @@ PJ_COORD pj_fwd4d (PJ_COORD coo, PJ *P)
- return proj_coord_error ();
-
- if (!P->skip_fwd_finalize)
-- coo = pj_fwd_finalize (P, coo);
-+ coo = fwd_finalize (P, coo);
- return coo;
- }
---- a/src/pj_gc_reader.c
-+++ b/src/pj_gc_reader.c
-@@ -32,7 +32,7 @@
- #include <string.h>
- #include <ctype.h>
-
--static int pj_gc_readentry(projCtx ctx, PAFile fid, PJ_GridCatalogEntry *entry);
-+static int gc_readentry(projCtx ctx, PAFile fid, PJ_GridCatalogEntry *entry);
-
- /************************************************************************/
- /* pj_gc_readcatalog() */
-@@ -81,7 +81,7 @@ PJ_GridCatalog *pj_gc_readcatalog( projC
- return NULL;
- }
-
-- while( pj_gc_readentry( ctx, fid,
-+ while( gc_readentry( ctx, fid,
- catalog->entries+catalog->entry_count) == 0)
- {
- catalog->entry_count++;
-@@ -114,13 +114,13 @@ PJ_GridCatalog *pj_gc_readcatalog( projC
- }
-
- /************************************************************************/
--/* pj_gc_read_csv_line() */
-+/* gc_read_csv_line() */
- /* */
- /* Simple csv line splitter with fixed maximum line size and */
- /* token count. */
- /************************************************************************/
-
--static int pj_gc_read_csv_line( projCtx ctx, PAFile fid,
-+static int gc_read_csv_line( projCtx ctx, PAFile fid,
- char **tokens, int max_tokens )
- {
- char line[302];
-@@ -197,7 +197,7 @@ double pj_gc_parsedate( projCtx ctx, con
-
-
- /************************************************************************/
--/* pj_gc_readentry() */
-+/* gc_readentry() */
- /* */
- /* Read one catalog entry from the file */
- /* */
-@@ -205,7 +205,7 @@ double pj_gc_parsedate( projCtx ctx, con
- /* gridname,ll_long,ll_lat,ur_long,ur_lat,priority,date */
- /************************************************************************/
-
--static int pj_gc_readentry(projCtx ctx, PAFile fid, PJ_GridCatalogEntry *entry)
-+static int gc_readentry(projCtx ctx, PAFile fid, PJ_GridCatalogEntry *entry)
- {
- #define MAX_TOKENS 30
- char *tokens[MAX_TOKENS];
-@@ -214,7 +214,7 @@ static int pj_gc_readentry(projCtx ctx,
-
- memset( entry, 0, sizeof(PJ_GridCatalogEntry) );
-
-- token_count = pj_gc_read_csv_line( ctx, fid, tokens, MAX_TOKENS );
-+ token_count = gc_read_csv_line( ctx, fid, tokens, MAX_TOKENS );
- if( token_count < 5 )
- {
- error = 1; /* TODO: need real error codes */
---- a/src/pj_gridinfo.c
-+++ b/src/pj_gridinfo.c
-@@ -389,12 +389,12 @@ int pj_gridinfo_load( projCtx ctx, PJ_GR
- }
-
- /************************************************************************/
--/* pj_gridinfo_parent() */
-+/* gridinfo_parent() */
- /* */
- /* Seek a parent grid file by name from a grid list */
- /************************************************************************/
-
--static PJ_GRIDINFO* pj_gridinfo_parent( PJ_GRIDINFO *gilist,
-+static PJ_GRIDINFO* gridinfo_parent( PJ_GRIDINFO *gilist,
- const char *name, int length )
- {
- while( gilist )
-@@ -402,7 +402,7 @@ static PJ_GRIDINFO* pj_gridinfo_parent(
- if( strncmp(gilist->ct->id,name,length) == 0 ) return gilist;
- if( gilist->child )
- {
-- PJ_GRIDINFO *parent=pj_gridinfo_parent( gilist->child, name, length );
-+ PJ_GRIDINFO *parent=gridinfo_parent( gilist->child, name, length );
- if( parent ) return parent;
- }
- gilist=gilist->next;
-@@ -596,7 +596,7 @@ static int pj_gridinfo_init_ntv2( projCt
- else
- {
- PJ_GRIDINFO *lnk;
-- PJ_GRIDINFO *gp = pj_gridinfo_parent(gilist,
-+ PJ_GRIDINFO *gp = gridinfo_parent(gilist,
- (const char*)header+24,8);
-
- if( gp == NULL )
---- a/src/pj_init.c
-+++ b/src/pj_init.c
-@@ -470,7 +470,7 @@ pj_init(int argc, char **argv) {
- }
-
-
--static PJ_CONSTRUCTOR pj_locate_constructor (const char *name) {
-+static PJ_CONSTRUCTOR locate_constructor (const char *name) {
- int i;
- char *s;
- for (i = 0; (s = pj_list[i].id) && strcmp(name, s) ; ++i) ;
-@@ -557,7 +557,7 @@ pj_init_ctx(projCtx ctx, int argc, char
- return pj_dealloc_params (ctx, start, PJD_ERR_PROJ_NOT_NAMED);
- name += 5;
-
-- proj = pj_locate_constructor (name);
-+ proj = locate_constructor (name);
- if (0==proj)
- return pj_dealloc_params (ctx, start, PJD_ERR_UNKNOWN_PROJECTION_ID);
-
---- a/src/pj_inv.c
-+++ b/src/pj_inv.c
-@@ -35,7 +35,7 @@
- #define INPUT_UNITS P->right
- #define OUTPUT_UNITS P->left
-
--static PJ_COORD pj_inv_prepare (PJ *P, PJ_COORD coo) {
-+static PJ_COORD inv_prepare (PJ *P, PJ_COORD coo) {
- if (coo.xyz.x == HUGE_VAL) {
- proj_errno_set (P, PJD_ERR_INVALID_X_OR_Y);
- return proj_coord_error ();
-@@ -132,7 +132,7 @@ static PJ_COORD pj_inv_prepare (PJ *P, P
-
-
-
--static PJ_COORD pj_inv_finalize (PJ *P, PJ_COORD coo) {
-+static PJ_COORD inv_finalize (PJ *P, PJ_COORD coo) {
- if (coo.xyz.x == HUGE_VAL) {
- proj_errno_set (P, PJD_ERR_INVALID_X_OR_Y);
- return proj_coord_error ();
-@@ -178,7 +178,7 @@ LP pj_inv(XY xy, PJ *P) {
- coo.xy = xy;
-
- if (!P->skip_inv_prepare)
-- coo = pj_inv_prepare (P, coo);
-+ coo = inv_prepare (P, coo);
- if (HUGE_VAL==coo.v[0])
- return proj_coord_error ().lp;
-
-@@ -197,7 +197,7 @@ LP pj_inv(XY xy, PJ *P) {
- return proj_coord_error ().lp;
-
- if (!P->skip_inv_finalize)
-- coo = pj_inv_finalize (P, coo);
-+ coo = inv_finalize (P, coo);
- return coo.lp;
- }
-
-@@ -208,7 +208,7 @@ LPZ pj_inv3d (XYZ xyz, PJ *P) {
- coo.xyz = xyz;
-
- if (!P->skip_inv_prepare)
-- coo = pj_inv_prepare (P, coo);
-+ coo = inv_prepare (P, coo);
- if (HUGE_VAL==coo.v[0])
- return proj_coord_error ().lpz;
-
-@@ -227,7 +227,7 @@ LPZ pj_inv3d (XYZ xyz, PJ *P) {
- return proj_coord_error ().lpz;
-
- if (!P->skip_inv_finalize)
-- coo = pj_inv_finalize (P, coo);
-+ coo = inv_finalize (P, coo);
- return coo.lpz;
- }
-
-@@ -235,7 +235,7 @@ LPZ pj_inv3d (XYZ xyz, PJ *P) {
-
- PJ_COORD pj_inv4d (PJ_COORD coo, PJ *P) {
- if (!P->skip_inv_prepare)
-- coo = pj_inv_prepare (P, coo);
-+ coo = inv_prepare (P, coo);
- if (HUGE_VAL==coo.v[0])
- return proj_coord_error ();
-
-@@ -254,6 +254,6 @@ PJ_COORD pj_inv4d (PJ_COORD coo, PJ *P)
- return proj_coord_error ();
-
- if (!P->skip_inv_finalize)
-- coo = pj_inv_finalize (P, coo);
-+ coo = inv_finalize (P, coo);
- return coo;
- }
---- a/src/pj_mutex.c
-+++ b/src/pj_mutex.c
-@@ -100,9 +100,9 @@ void pj_cleanup_lock()
-
- #include "pthread.h"
-
--static pthread_mutex_t pj_precreated_lock = PTHREAD_MUTEX_INITIALIZER;
--static pthread_mutex_t pj_core_lock;
--static int pj_core_lock_created = 0;
-+static pthread_mutex_t precreated_lock = PTHREAD_MUTEX_INITIALIZER;
-+static pthread_mutex_t core_lock;
-+static int core_lock_created = 0;
-
- /************************************************************************/
- /* pj_acquire_lock() */
-@@ -112,16 +112,16 @@ static int pj_core_lock_created = 0;
-
- void pj_acquire_lock()
- {
-- if (!pj_core_lock_created) {
-+ if (!core_lock_created) {
- /*
- ** We need to ensure the core mutex is created in recursive mode
- ** and there is no portable way of doing that using automatic
-- ** initialization so we have pj_precreated_lock only for the purpose
-+ ** initialization so we have precreated_lock only for the purpose
- ** of protecting the creation of the core lock.
- */
- pthread_mutexattr_t mutex_attr;
-
-- pthread_mutex_lock( &pj_precreated_lock);
-+ pthread_mutex_lock( &precreated_lock);
-
- pthread_mutexattr_init(&mutex_attr);
- #ifdef HAVE_PTHREAD_MUTEX_RECURSIVE
-@@ -129,13 +129,13 @@ void pj_acquire_lock()
- #else
- pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE_NP);
- #endif
-- pthread_mutex_init(&pj_core_lock, &mutex_attr);
-- pj_core_lock_created = 1;
-+ pthread_mutex_init(&core_lock, &mutex_attr);
-+ core_lock_created = 1;
-
-- pthread_mutex_unlock( &pj_precreated_lock );
-+ pthread_mutex_unlock( &precreated_lock );
- }
-
-- pthread_mutex_lock( &pj_core_lock);
-+ pthread_mutex_lock( &core_lock);
- }
-
- /************************************************************************/
-@@ -146,7 +146,7 @@ void pj_acquire_lock()
-
- void pj_release_lock()
- {
-- pthread_mutex_unlock( &pj_core_lock );
-+ pthread_mutex_unlock( &core_lock );
- }
-
- /************************************************************************/
---- a/src/pj_strtod.c
-+++ b/src/pj_strtod.c
-@@ -69,10 +69,10 @@ double pj_atof( const char* nptr )
-
-
- /************************************************************************/
--/* pj_replace_point_by_locale_point() */
-+/* replace_point_by_locale_point() */
- /************************************************************************/
-
--static char* pj_replace_point_by_locale_point(const char* pszNumber, char point,
-+static char* replace_point_by_locale_point(const char* pszNumber, char point,
- char* pszWorkBuffer)
- {
- #if !defined(HAVE_LOCALECONV)
-@@ -179,7 +179,7 @@ double pj_strtod( const char *nptr, char
- int nError;
- char szWorkBuffer[PJ_STRTOD_WORK_BUFFER_SIZE];
-
-- char* pszNumber = pj_replace_point_by_locale_point(nptr, '.', szWorkBuffer);
-+ char* pszNumber = replace_point_by_locale_point(nptr, '.', szWorkBuffer);
-
- dfValue = strtod( pszNumber, endptr );
- nError = errno;
---- a/src/pj_transform.c
-+++ b/src/pj_transform.c
-@@ -44,7 +44,7 @@ typedef enum PJ_DIRECTION PJ_DIRECTION;
-
-
-
--static int pj_adjust_axis( projCtx ctx, const char *axis, int denormalize_flag,
-+static int adjust_axis( projCtx ctx, const char *axis, int denormalize_flag,
- long point_count, int point_offset,
- double *x, double *y, double *z );
-
-@@ -104,7 +104,7 @@ static int adjust_axes (PJ *P, PJ_DIRECT
- if (0==strcmp(P->axis,"enu"))
- return 0;
-
-- return pj_adjust_axis( P->ctx, P->axis,
-+ return adjust_axis( P->ctx, P->axis,
- dir==PJ_FWD ? 1: 0, n, dist, x, y, z );
- }
-
-@@ -914,12 +914,12 @@ int pj_datum_transform( PJ *srcdefn, PJ
- }
-
- /************************************************************************/
--/* pj_adjust_axis() */
-+/* adjust_axis() */
- /* */
- /* Normalize or de-normalized the x/y/z axes. The normal form */
- /* is "enu" (easting, northing, up). */
- /************************************************************************/
--static int pj_adjust_axis( projCtx ctx,
-+static int adjust_axis( projCtx ctx,
- const char *axis, int denormalize_flag,
- long point_count, int point_offset,
- double *x, double *y, double *z )
---- a/src/proj_4D_api.c
-+++ b/src/proj_4D_api.c
-@@ -409,7 +409,7 @@ in cs2cs compatibility mode.
- }
-
- /*************************************************************************************/
--static int pj_cs2cs_emulation_setup (PJ *P) {
-+static int cs2cs_emulation_setup (PJ *P) {
- /**************************************************************************************
- If any cs2cs style modifiers are given (axis=..., towgs84=..., ) create the 4D API
- equivalent operations, so the preparation and finalization steps in the pj_inv/pj_fwd
-@@ -564,7 +564,7 @@ PJ *proj_create (PJ_CONTEXT *ctx, const
- pj_dealloc (args);
-
- /* Support cs2cs-style modifiers */
-- ret = pj_cs2cs_emulation_setup (P);
-+ ret = cs2cs_emulation_setup (P);
- if (0==ret)
- return proj_destroy (P);
-
diff --git a/debian/patches/pj_transform-height_unit.patch b/debian/patches/pj_transform-height_unit.patch
deleted file mode 100644
index c50fb65..0000000
--- a/debian/patches/pj_transform-height_unit.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Description: Fix height_unit() in proj_transform.c.
-Author: Bas Couwenberg <sebastic at debian.org>
-Forwarded: https://github.com/OSGeo/proj.4/pull/845#issuecomment-371785556
-Applied-Upstream: https://github.com/OSGeo/proj.4/commit/b0277377e353e81718c685090ceea5757fabc88e
-
---- a/src/pj_transform.c
-+++ b/src/pj_transform.c
-@@ -397,7 +397,9 @@ static int height_unit (PJ *P, PJ_DIRECT
- fac = P->vfr_meter;
-
- /* Nothing to do? */
-- if (P->vto_meter==0.0)
-+ if (fac==1.0)
-+ return 0;
-+ if (0==z)
- return 0;
-
- for (i = 0; i < n; i++)
diff --git a/debian/patches/pr845_Refactor-pj_transform-reintroduce-support-for-vertical-scaling.patch b/debian/patches/pr845_Refactor-pj_transform-reintroduce-support-for-vertical-scaling.patch
deleted file mode 100644
index b09de2d..0000000
--- a/debian/patches/pr845_Refactor-pj_transform-reintroduce-support-for-vertical-scaling.patch
+++ /dev/null
@@ -1,798 +0,0 @@
-Subject: Refactor pj_transform, reintroduce support for vertical scaling
- Change operation step names to reflect their bidirectional nature
-Author: Thomas Knudsen <thokn at sdfe.dk>
-Origin: https://github.com/OSGeo/proj.4/pull/845
-Bug: https://github.com/OSGeo/proj.4/issues/833
-Bug-Debian: https://bugs.debian.org/892062
-
---- a/src/pj_transform.c
-+++ b/src/pj_transform.c
-@@ -27,11 +27,23 @@
- * DEALINGS IN THE SOFTWARE.
- *****************************************************************************/
-
--#include <projects.h>
-+#include "projects.h"
- #include <string.h>
- #include <math.h>
- #include "geocent.h"
-
-+
-+/* Apply transformation to observation - in forward or inverse direction */
-+/* Copied from proj.h */
-+enum PJ_DIRECTION {
-+ PJ_FWD = 1, /* Forward */
-+ PJ_IDENT = 0, /* Do nothing */
-+ PJ_INV = -1 /* Inverse */
-+};
-+typedef enum PJ_DIRECTION PJ_DIRECTION;
-+
-+
-+
- static int pj_adjust_axis( projCtx ctx, const char *axis, int denormalize_flag,
- long point_count, int point_offset,
- double *x, double *y, double *z );
-@@ -81,388 +93,468 @@ static const int transient_error[60] = {
- /* 40 to 49 */ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
- /* 50 to 59 */ 1, 0, 1, 0, 1, 1, 1, 1, 0, 0 };
-
--/************************************************************************/
--/* pj_transform() */
--/* */
--/* Currently this function doesn't recognise if two projections */
--/* are identical (to short circuit reprojection) because it is */
--/* difficult to compare PJ structures (since there are some */
--/* projection specific components). */
--/************************************************************************/
--
--int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset,
-- double *x, double *y, double *z )
--
--{
-- long i;
-
-- srcdefn->ctx->last_errno = 0;
-- dstdefn->ctx->last_errno = 0;
--
-- if( point_offset == 0 )
-- point_offset = 1;
-
- /* -------------------------------------------------------------------- */
- /* Transform unusual input coordinate axis orientation to */
- /* standard form if needed. */
- /* -------------------------------------------------------------------- */
-- if( strcmp(srcdefn->axis,"enu") != 0 )
-- {
-- int err;
-+static int adjust_axes (PJ *P, PJ_DIRECTION dir, long n, int dist, double *x, double *y, double *z) {
-+ /* Nothing to do? */
-+ if (0==strcmp(P->axis,"enu"))
-+ return 0;
-+
-+ return pj_adjust_axis( P->ctx, P->axis,
-+ dir==PJ_FWD ? 1: 0, n, dist, x, y, z );
-+}
-
-- err = pj_adjust_axis( srcdefn->ctx, srcdefn->axis,
-- 0, point_count, point_offset, x, y, z );
-- if( err != 0 )
-- return err;
-+
-+
-+/* ----------------------------------------------------------------------- */
-+/* Transform cartesian ("geocentric") source coordinates to lat/long, */
-+/* if needed */
-+/* ----------------------------------------------------------------------- */
-+static int geographic_to_cartesian (PJ *P, PJ_DIRECTION dir, long n, int dist, double *x, double *y, double *z) {
-+ int res;
-+ long i;
-+ double fac = P->to_meter;
-+
-+ /* Nothing to do? */
-+ if (!P->is_geocent)
-+ return 0;
-+
-+ if ( z == NULL ) {
-+ pj_ctx_set_errno( pj_get_ctx(P), PJD_ERR_GEOCENTRIC);
-+ return PJD_ERR_GEOCENTRIC;
-+ }
-+
-+ if (PJ_FWD==dir) {
-+ fac = P->fr_meter;
-+ res = pj_geodetic_to_geocentric( P->a_orig, P->es_orig, n, dist, x, y, z );
-+ if (res)
-+ return res;
-+ }
-+
-+ if (fac != 1.0) {
-+ for( i = 0; i < n; i++ ) {
-+ if( x[dist*i] != HUGE_VAL ) {
-+ x[dist*i] *= fac;
-+ y[dist*i] *= fac;
-+ z[dist*i] *= fac;
-+ }
-+ }
- }
-
-+ if (PJ_FWD==dir)
-+ return 0;
-+ return pj_geocentric_to_geodetic(
-+ P->a_orig, P->es_orig,
-+ n, dist,
-+ x, y, z
-+ );
-+}
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
- /* -------------------------------------------------------------------- */
--/* Transform geocentric source coordinates to lat/long. */
-+/* Transform destination points to projection coordinates, if */
-+/* desired. */
-+/* */
-+/* Ought to fold this into projected_to_geographic */
- /* -------------------------------------------------------------------- */
-- if( srcdefn->is_geocent )
-+static int geographic_to_projected (PJ *P, long n, int dist, double *x, double *y, double *z) {
-+ long i;
-+
-+ /* Nothing to do? */
-+ if (P->is_latlong)
-+ return 0;
-+ if (P->is_geocent)
-+ return 0;
-+
-+ if(P->fwd3d != NULL)
- {
-- int err;
-- if( z == NULL )
-+ /* Three dimensions must be defined */
-+ if ( z == NULL)
- {
-- pj_ctx_set_errno( pj_get_ctx(srcdefn), PJD_ERR_GEOCENTRIC);
-+ pj_ctx_set_errno( pj_get_ctx(P), PJD_ERR_GEOCENTRIC);
- return PJD_ERR_GEOCENTRIC;
- }
-
-- if( srcdefn->to_meter != 1.0 )
-+ for( i = 0; i < n; i++ )
- {
-- for( i = 0; i < point_count; i++ )
-+ XYZ projected_loc;
-+ LPZ geodetic_loc;
-+
-+ geodetic_loc.u = x[dist*i];
-+ geodetic_loc.v = y[dist*i];
-+ geodetic_loc.w = z[dist*i];
-+
-+ if (geodetic_loc.u == HUGE_VAL)
-+ continue;
-+
-+ projected_loc = pj_fwd3d( geodetic_loc, P);
-+ if( P->ctx->last_errno != 0 )
- {
-- if( x[point_offset*i] != HUGE_VAL )
-+ if( (P->ctx->last_errno != 33 /*EDOM*/
-+ && P->ctx->last_errno != 34 /*ERANGE*/ )
-+ && (P->ctx->last_errno > 0
-+ || P->ctx->last_errno < -44 || n == 1
-+ || transient_error[-P->ctx->last_errno] == 0 ) )
-+ return P->ctx->last_errno;
-+ else
- {
-- x[point_offset*i] *= srcdefn->to_meter;
-- y[point_offset*i] *= srcdefn->to_meter;
-- z[point_offset*i] *= srcdefn->to_meter;
-+ projected_loc.u = HUGE_VAL;
-+ projected_loc.v = HUGE_VAL;
-+ projected_loc.w = HUGE_VAL;
- }
- }
-- }
-
-- err = pj_geocentric_to_geodetic( srcdefn->a_orig, srcdefn->es_orig,
-- point_count, point_offset,
-- x, y, z );
-- if( err != 0 )
-- return err;
-+ x[dist*i] = projected_loc.u;
-+ y[dist*i] = projected_loc.v;
-+ z[dist*i] = projected_loc.w;
-+ }
-+ return 0;
- }
-
--/* -------------------------------------------------------------------- */
--/* Transform source points to lat/long, if they aren't */
--/* already. */
--/* -------------------------------------------------------------------- */
-- else if( !srcdefn->is_latlong )
-+ for( i = 0; i <n; i++ )
- {
-+ XY projected_loc;
-+ LP geodetic_loc;
-
-- /* Check first if projection is invertible. */
-- if( (srcdefn->inv3d == NULL) && (srcdefn->inv == NULL))
-- {
-- pj_ctx_set_errno( pj_get_ctx(srcdefn), -17 );
-- pj_log( pj_get_ctx(srcdefn), PJ_LOG_ERROR,
-- "pj_transform(): source projection not invertable" );
-- return -17;
-- }
-+ geodetic_loc.u = x[dist*i];
-+ geodetic_loc.v = y[dist*i];
-+
-+ if( geodetic_loc.u == HUGE_VAL )
-+ continue;
-
-- /* If invertible - First try inv3d if defined */
-- if (srcdefn->inv3d != NULL)
-+ projected_loc = pj_fwd( geodetic_loc, P );
-+ if( P->ctx->last_errno != 0 )
- {
-- /* Three dimensions must be defined */
-- if ( z == NULL)
-+ if( (P->ctx->last_errno != 33 /*EDOM*/
-+ && P->ctx->last_errno != 34 /*ERANGE*/ )
-+ && (P->ctx->last_errno > 0
-+ || P->ctx->last_errno < -44 || n == 1
-+ || transient_error[-P->ctx->last_errno] == 0 ) )
-+ return P->ctx->last_errno;
-+ else
- {
-- pj_ctx_set_errno( pj_get_ctx(srcdefn), PJD_ERR_GEOCENTRIC);
-- return PJD_ERR_GEOCENTRIC;
-+ projected_loc.u = HUGE_VAL;
-+ projected_loc.v = HUGE_VAL;
- }
-+ }
-
-- for (i=0; i < point_count; i++)
-- {
-- XYZ projected_loc;
-- XYZ geodetic_loc;
-+ x[dist*i] = projected_loc.u;
-+ y[dist*i] = projected_loc.v;
-+ }
-+ return 0;
-+}
-
-- projected_loc.u = x[point_offset*i];
-- projected_loc.v = y[point_offset*i];
-- projected_loc.w = z[point_offset*i];
-
-- if (projected_loc.u == HUGE_VAL)
-- continue;
-
-- geodetic_loc = pj_inv3d(projected_loc, srcdefn);
-- if( srcdefn->ctx->last_errno != 0 )
-- {
-- if( (srcdefn->ctx->last_errno != 33 /*EDOM*/
-- && srcdefn->ctx->last_errno != 34 /*ERANGE*/ )
-- && (srcdefn->ctx->last_errno > 0
-- || srcdefn->ctx->last_errno < -44 || point_count == 1
-- || transient_error[-srcdefn->ctx->last_errno] == 0 ) )
-- return srcdefn->ctx->last_errno;
-- else
-- {
-- geodetic_loc.u = HUGE_VAL;
-- geodetic_loc.v = HUGE_VAL;
-- geodetic_loc.w = HUGE_VAL;
-- }
-- }
-
-- x[point_offset*i] = geodetic_loc.u;
-- y[point_offset*i] = geodetic_loc.v;
-- z[point_offset*i] = geodetic_loc.w;
-
-- }
-+/* ----------------------------------------------------------------------- */
-+/* Transform projected source coordinates to lat/long, if needed */
-+/* ----------------------------------------------------------------------- */
-+static int projected_to_geographic (PJ *P, long n, int dist, double *x, double *y, double *z) {
-+ long i;
-
-+ /* Nothing to do? */
-+ if (P->is_latlong)
-+ return 0;
-+
-+ /* Check first if projection is invertible. */
-+ if( (P->inv3d == NULL) && (P->inv == NULL))
-+ {
-+ pj_ctx_set_errno( pj_get_ctx(P), -17 );
-+ pj_log( pj_get_ctx(P), PJ_LOG_ERROR,
-+ "pj_transform(): source projection not invertable" );
-+ return -17;
-+ }
-+
-+ /* If invertible - First try inv3d if defined */
-+ if (P->inv3d != NULL)
-+ {
-+ /* Three dimensions must be defined */
-+ if ( z == NULL)
-+ {
-+ pj_ctx_set_errno( pj_get_ctx(P), PJD_ERR_GEOCENTRIC);
-+ return PJD_ERR_GEOCENTRIC;
- }
-- else
-+
-+ for (i=0; i < n; i++)
- {
-- /* Fallback to the original PROJ.4 API 2d inversion - inv */
-- for( i = 0; i < point_count; i++ )
-- {
-- XY projected_loc;
-- LP geodetic_loc;
-+ XYZ projected_loc;
-+ XYZ geodetic_loc;
-
-- projected_loc.u = x[point_offset*i];
-- projected_loc.v = y[point_offset*i];
-+ projected_loc.u = x[dist*i];
-+ projected_loc.v = y[dist*i];
-+ projected_loc.w = z[dist*i];
-
-- if( projected_loc.u == HUGE_VAL )
-- continue;
-+ if (projected_loc.u == HUGE_VAL)
-+ continue;
-
-- geodetic_loc = pj_inv( projected_loc, srcdefn );
-- if( srcdefn->ctx->last_errno != 0 )
-+ geodetic_loc = pj_inv3d(projected_loc, P);
-+ if( P->ctx->last_errno != 0 )
-+ {
-+ if( (P->ctx->last_errno != 33 /*EDOM*/
-+ && P->ctx->last_errno != 34 /*ERANGE*/ )
-+ && (P->ctx->last_errno > 0
-+ || P->ctx->last_errno < -44 || n == 1
-+ || transient_error[-P->ctx->last_errno] == 0 ) )
-+ return P->ctx->last_errno;
-+ else
- {
-- if( (srcdefn->ctx->last_errno != 33 /*EDOM*/
-- && srcdefn->ctx->last_errno != 34 /*ERANGE*/ )
-- && (srcdefn->ctx->last_errno > 0
-- || srcdefn->ctx->last_errno < -44 || point_count == 1
-- || transient_error[-srcdefn->ctx->last_errno] == 0 ) )
-- return srcdefn->ctx->last_errno;
-- else
-- {
-- geodetic_loc.u = HUGE_VAL;
-- geodetic_loc.v = HUGE_VAL;
-- }
-+ geodetic_loc.u = HUGE_VAL;
-+ geodetic_loc.v = HUGE_VAL;
-+ geodetic_loc.w = HUGE_VAL;
- }
--
-- x[point_offset*i] = geodetic_loc.u;
-- y[point_offset*i] = geodetic_loc.v;
- }
-- }
-- }
-
--/* -------------------------------------------------------------------- */
--/* But if they are already lat long, adjust for the prime */
--/* meridian if there is one in effect. */
--/* -------------------------------------------------------------------- */
-- if ((srcdefn->is_geocent || srcdefn->is_latlong) && ( srcdefn->from_greenwich != 0.0 ))
-- {
-- for( i = 0; i < point_count; i++ )
-- {
-- if( x[point_offset*i] != HUGE_VAL )
-- x[point_offset*i] += srcdefn->from_greenwich;
-+ x[dist*i] = geodetic_loc.u;
-+ y[dist*i] = geodetic_loc.v;
-+ z[dist*i] = geodetic_loc.w;
-+
- }
-+ return 0;
- }
-
--/* -------------------------------------------------------------------- */
--/* Do we need to translate from geoid to ellipsoidal vertical */
--/* datum? */
--/* -------------------------------------------------------------------- */
-- if( srcdefn->has_geoid_vgrids && z != NULL )
-- {
-- if( pj_apply_vgridshift( srcdefn, "sgeoidgrids",
-- &(srcdefn->vgridlist_geoid),
-- &(srcdefn->vgridlist_geoid_count),
-- 0, point_count, point_offset, x, y, z ) != 0 )
-- return pj_ctx_get_errno(srcdefn->ctx);
-- }
-+ /* Fallback to the original PROJ.4 API 2d inversion - inv */
-+ for( i = 0; i < n; i++ ) {
-+ XY projected_loc;
-+ LP geodetic_loc;
-
--/* -------------------------------------------------------------------- */
--/* Convert datums if needed, and possible. */
--/* -------------------------------------------------------------------- */
-- if( pj_datum_transform( srcdefn, dstdefn, point_count, point_offset,
-- x, y, z ) != 0 )
-- {
-- if( srcdefn->ctx->last_errno != 0 )
-- return srcdefn->ctx->last_errno;
-- else
-- return dstdefn->ctx->last_errno;
-- }
-+ projected_loc.u = x[dist*i];
-+ projected_loc.v = y[dist*i];
-
--/* -------------------------------------------------------------------- */
--/* Do we need to translate from ellipsoidal to geoid vertical */
--/* datum? */
--/* -------------------------------------------------------------------- */
-- if( dstdefn->has_geoid_vgrids && z != NULL )
-- {
-- if( pj_apply_vgridshift( dstdefn, "sgeoidgrids",
-- &(dstdefn->vgridlist_geoid),
-- &(dstdefn->vgridlist_geoid_count),
-- 1, point_count, point_offset, x, y, z ) != 0 )
-- return dstdefn->ctx->last_errno;
-- }
-+ if( projected_loc.u == HUGE_VAL )
-+ continue;
-
--/* -------------------------------------------------------------------- */
--/* But if they are staying lat long, adjust for the prime */
--/* meridian if there is one in effect. */
--/* -------------------------------------------------------------------- */
-- if ((dstdefn->is_geocent || dstdefn->is_latlong) && ( dstdefn->from_greenwich != 0.0 ))
-- {
-- for( i = 0; i < point_count; i++ )
-+ geodetic_loc = pj_inv( projected_loc, P );
-+ if( P->ctx->last_errno != 0 )
- {
-- if( x[point_offset*i] != HUGE_VAL )
-- x[point_offset*i] -= dstdefn->from_greenwich;
-+ if( (P->ctx->last_errno != 33 /*EDOM*/
-+ && P->ctx->last_errno != 34 /*ERANGE*/ )
-+ && (P->ctx->last_errno > 0
-+ || P->ctx->last_errno < -44 || n == 1
-+ || transient_error[-P->ctx->last_errno] == 0 ) )
-+ return P->ctx->last_errno;
-+ else
-+ {
-+ geodetic_loc.u = HUGE_VAL;
-+ geodetic_loc.v = HUGE_VAL;
-+ }
- }
-+
-+ x[dist*i] = geodetic_loc.u;
-+ y[dist*i] = geodetic_loc.v;
-+ }
-+ return 0;
- }
-
-+
-+
- /* -------------------------------------------------------------------- */
--/* Transform destination latlong to geocentric if required. */
-+/* Adjust for the prime meridian if needed. */
- /* -------------------------------------------------------------------- */
-- if( dstdefn->is_geocent )
-- {
-- if( z == NULL )
-- {
-- pj_ctx_set_errno( dstdefn->ctx, PJD_ERR_GEOCENTRIC );
-- return PJD_ERR_GEOCENTRIC;
-- }
-+static int prime_meridian (PJ *P, PJ_DIRECTION dir, long n, int dist, double *x) {
-+ int i;
-+ double pm = P->from_greenwich;
-+
-+ /* Nothing to do? */
-+ if (pm==0.0)
-+ return 0;
-+ if (!(P->is_geocent || P->is_latlong))
-+ return 0;
-+
-+ if (dir==PJ_FWD)
-+ pm = -pm;
-+
-+ for (i = 0; i < n; i++)
-+ if (x[dist*i] != HUGE_VAL)
-+ x[dist*i] += pm;
-+
-+ return 0;
-+}
-
-- pj_geodetic_to_geocentric( dstdefn->a_orig, dstdefn->es_orig,
-- point_count, point_offset, x, y, z );
-
-- if( dstdefn->fr_meter != 1.0 )
-- {
-- for( i = 0; i < point_count; i++ )
-- {
-- if( x[point_offset*i] != HUGE_VAL )
-- {
-- x[point_offset*i] *= dstdefn->fr_meter;
-- y[point_offset*i] *= dstdefn->fr_meter;
-- z[point_offset*i] *= srcdefn->fr_meter;
-- }
-- }
-- }
-- }
-
- /* -------------------------------------------------------------------- */
--/* Transform destination points to projection coordinates, if */
--/* desired. */
-+/* Adjust for vertical scale factor if needed */
- /* -------------------------------------------------------------------- */
-- else if( !dstdefn->is_latlong )
-- {
-+static int height_unit (PJ *P, PJ_DIRECTION dir, long n, int dist, double *z) {
-+ int i;
-+ double fac = P->vto_meter;
-+
-+ if (PJ_FWD==dir)
-+ fac = P->vfr_meter;
-+
-+ /* Nothing to do? */
-+ if (P->vto_meter==0.0)
-+ return 0;
-+
-+ for (i = 0; i < n; i++)
-+ if (z[dist*i] != HUGE_VAL )
-+ z[dist*i] *= fac;
-
-- if( dstdefn->fwd3d != NULL)
-- {
-- /* Three dimensions must be defined */
-- if ( z == NULL)
-- {
-- pj_ctx_set_errno( pj_get_ctx(dstdefn), PJD_ERR_GEOCENTRIC);
-- return PJD_ERR_GEOCENTRIC;
-- }
-+ return 0;
-+}
-
-- for( i = 0; i < point_count; i++ )
-- {
-- XYZ projected_loc;
-- LPZ geodetic_loc;
-
-- geodetic_loc.u = x[point_offset*i];
-- geodetic_loc.v = y[point_offset*i];
-- geodetic_loc.w = z[point_offset*i];
-
-- if (geodetic_loc.u == HUGE_VAL)
-- continue;
-+/* -------------------------------------------------------------------- */
-+/* Transform to ellipsoidal heights if needed */
-+/* -------------------------------------------------------------------- */
-+static int geometric_to_orthometric (PJ *P, PJ_DIRECTION dir, long n, int dist, double *x, double *y, double *z) {
-+ int err;
-+ if (0==P->has_geoid_vgrids)
-+ return 0;
-+ if (z==0)
-+ return PJD_ERR_GEOCENTRIC;
-+ err = pj_apply_vgridshift (P, "sgeoidgrids",
-+ &(P->vgridlist_geoid),
-+ &(P->vgridlist_geoid_count),
-+ dir==PJ_FWD ? 1 : 0, n, dist, x, y, z );
-+ if (err)
-+ return pj_ctx_get_errno(P->ctx);
-+ return 0;
-+}
-
-- projected_loc = pj_fwd3d( geodetic_loc, dstdefn);
-- if( dstdefn->ctx->last_errno != 0 )
-- {
-- if( (dstdefn->ctx->last_errno != 33 /*EDOM*/
-- && dstdefn->ctx->last_errno != 34 /*ERANGE*/ )
-- && (dstdefn->ctx->last_errno > 0
-- || dstdefn->ctx->last_errno < -44 || point_count == 1
-- || transient_error[-dstdefn->ctx->last_errno] == 0 ) )
-- return dstdefn->ctx->last_errno;
-- else
-- {
-- projected_loc.u = HUGE_VAL;
-- projected_loc.v = HUGE_VAL;
-- projected_loc.w = HUGE_VAL;
-- }
-- }
-
-- x[point_offset*i] = projected_loc.u;
-- y[point_offset*i] = projected_loc.v;
-- z[point_offset*i] = projected_loc.w;
-- }
-
-- }
-- else
-- {
-- for( i = 0; i < point_count; i++ )
-- {
-- XY projected_loc;
-- LP geodetic_loc;
-+/* -------------------------------------------------------------------- */
-+/* Convert datums if needed, and possible. */
-+/* -------------------------------------------------------------------- */
-+static int datum_transform (PJ *P, PJ *Q, long n, int dist, double *x, double *y, double *z) {
-+ if (0==pj_datum_transform (P, Q, n, dist, x, y, z))
-+ return 0;
-+ if (P->ctx->last_errno)
-+ return P->ctx->last_errno;
-+ return Q->ctx->last_errno;
-+}
-
-- geodetic_loc.u = x[point_offset*i];
-- geodetic_loc.v = y[point_offset*i];
-
-- if( geodetic_loc.u == HUGE_VAL )
-- continue;
-
-- projected_loc = pj_fwd( geodetic_loc, dstdefn );
-- if( dstdefn->ctx->last_errno != 0 )
-- {
-- if( (dstdefn->ctx->last_errno != 33 /*EDOM*/
-- && dstdefn->ctx->last_errno != 34 /*ERANGE*/ )
-- && (dstdefn->ctx->last_errno > 0
-- || dstdefn->ctx->last_errno < -44 || point_count == 1
-- || transient_error[-dstdefn->ctx->last_errno] == 0 ) )
-- return dstdefn->ctx->last_errno;
-- else
-- {
-- projected_loc.u = HUGE_VAL;
-- projected_loc.v = HUGE_VAL;
-- }
-- }
-
-- x[point_offset*i] = projected_loc.u;
-- y[point_offset*i] = projected_loc.v;
-- }
-- }
-- }
-
- /* -------------------------------------------------------------------- */
- /* If a wrapping center other than 0 is provided, rewrap around */
- /* the suggested center (for latlong coordinate systems only). */
- /* -------------------------------------------------------------------- */
-- else if( dstdefn->is_latlong && dstdefn->is_long_wrap_set )
-- {
-- for( i = 0; i < point_count; i++ )
-- {
-- double val = x[point_offset*i];
-- if( val == HUGE_VAL )
-- continue;
-+static int long_wrap (PJ *P, long n, int dist, double *x) {
-+ long i;
-
-- /* Get fast in ] -2 PI, 2 PI [ range */
-- val = fmod(val, M_TWOPI);
-- while( val < dstdefn->long_wrap_center - M_PI )
-- val += M_TWOPI;
-- while( val > dstdefn->long_wrap_center + M_PI )
-- val -= M_TWOPI;
-- x[point_offset*i] = val;
-- }
-+ /* Nothing to do? */
-+ if (P->is_geocent)
-+ return 0;
-+ if (!P->is_long_wrap_set)
-+ return 0;
-+ if (!P->is_latlong)
-+ return 0;
-+
-+ for (i = 0; i < n; i++ ) {
-+ double val = x[dist*i];
-+ if (val == HUGE_VAL)
-+ continue;
-+
-+ /* Get fast in ] -2 PI, 2 PI [ range */
-+ val = fmod(val, M_TWOPI);
-+ while( val < P->long_wrap_center - M_PI )
-+ val += M_TWOPI;
-+ while( val > P->long_wrap_center + M_PI )
-+ val -= M_TWOPI;
-+ x[dist*i] = val;
- }
-+ return 0;
-+}
-
--/* -------------------------------------------------------------------- */
--/* Transform normalized axes into unusual output coordinate axis */
--/* orientation if needed. */
--/* -------------------------------------------------------------------- */
-- if( strcmp(dstdefn->axis,"enu") != 0 )
-- {
-- int err;
-
-- err = pj_adjust_axis( dstdefn->ctx, dstdefn->axis,
-- 1, point_count, point_offset, x, y, z );
-- if( err != 0 )
-- return err;
-- }
-+
-+/************************************************************************/
-+/* pj_transform() */
-+/* */
-+/* Currently this function doesn't recognise if two projections */
-+/* are identical (to short circuit reprojection) because it is */
-+/* difficult to compare PJ structures (since there are some */
-+/* projection specific components). */
-+/************************************************************************/
-+
-+int pj_transform(
-+ PJ *srcdefn, PJ *dstdefn,
-+ long point_count, int point_offset,
-+ double *x, double *y, double *z
-+){
-+ int err;
-+
-+ srcdefn->ctx->last_errno = 0;
-+ dstdefn->ctx->last_errno = 0;
-+
-+ if( point_offset == 0 )
-+ point_offset = 1;
-+
-+ /* Bring input to "normal form": longitude, latitude, ellipsoidal height */
-+
-+ err = adjust_axes (srcdefn, PJ_INV, point_count, point_offset, x, y, z);
-+ if (err)
-+ return err;
-+ err = geographic_to_cartesian (srcdefn, PJ_INV, point_count, point_offset, x, y, z);
-+ if (err)
-+ return err;
-+ err = projected_to_geographic (srcdefn, point_count, point_offset, x, y, z);
-+ if (err)
-+ return err;
-+ err = prime_meridian (srcdefn, PJ_INV, point_count, point_offset, x);
-+ if (err)
-+ return err;
-+ err = height_unit (srcdefn, PJ_INV, point_count, point_offset, z);
-+ if (err)
-+ return err;
-+ err = geometric_to_orthometric (srcdefn, PJ_INV, point_count, point_offset, x, y, z);
-+ if (err)
-+ return err;
-+
-+ /* At the center of the process we do the datum shift (if needed) */
-+
-+ err = datum_transform(srcdefn, dstdefn, point_count, point_offset, x, y, z );
-+ if (err)
-+ return err;
-+
-+ /* Now get out on the other side: Bring "normal form" to output form */
-+
-+ err = geometric_to_orthometric (dstdefn, PJ_FWD, point_count, point_offset, x, y, z);
-+ if (err)
-+ return err;
-+ err = height_unit (dstdefn, PJ_FWD, point_count, point_offset, z);
-+ if (err)
-+ return err;
-+ err = prime_meridian (dstdefn, PJ_FWD, point_count, point_offset, x);
-+ if (err)
-+ return err;
-+ err = geographic_to_cartesian (dstdefn, PJ_FWD, point_count, point_offset, x, y, z);
-+ if (err)
-+ return err;
-+ err = geographic_to_projected (dstdefn, point_count, point_offset, x, y, z);
-+ if (err)
-+ return err;
-+ err = long_wrap (dstdefn, point_count, point_offset, x);
-+ if (err)
-+ return err;
-+ err = adjust_axes (dstdefn, PJ_FWD, point_count, point_offset, x, y, z);
-+ if (err)
-+ return err;
-
- return 0;
- }
-
-+
-+
- /************************************************************************/
- /* pj_geodetic_to_geocentric() */
- /************************************************************************/
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 6b60ad9..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,6 +0,0 @@
-0001-Revert-fix-to-22.patch
-pr845_Refactor-pj_transform-reintroduce-support-for-vertical-scaling.patch
-pj_transform-height_unit.patch
-Remove-angle-brackets-for-proj-headers.patch
-Remove-pj_-prefix-from-static-functions.patch
-Make-sure-that-transient-errors-are-returned-correctly.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/proj.git
More information about the Pkg-grass-devel
mailing list