[Git][debian-gis-team/proj][upstream] New upstream version 6.0.0~rc3

Bas Couwenberg gitlab at salsa.debian.org
Mon Feb 25 21:36:35 GMT 2019


Bas Couwenberg pushed to branch upstream at Debian GIS Project / proj


Commits:
656f08ad by Bas Couwenberg at 2019-02-25T21:01:28Z
New upstream version 6.0.0~rc3
- - - - -


19 changed files:

- AUTHORS
- NEWS
- man/man1/projinfo.1
- src/iso19111/coordinateoperation.cpp
- src/jniproj.cpp
- src/projections/robin.cpp
- src/projections/sch.cpp
- test/cli/Makefile.am
- test/cli/Makefile.in
- test/cli/test27
- test/cli/test83
- test/cli/testIGNF
- test/cli/testcct
- test/cli/testdatumfile
- test/cli/testflaky
- test/cli/testntv2
- test/cli/testprojinfo
- test/cli/testvarious
- test/gie/builtins.gie


Changes:

=====================================
AUTHORS
=====================================
@@ -1,19 +1,42 @@
-Original Author:
-Gerald Evenden
+--------------------------------------------------------------------------------
+Authors
+--------------------------------------------------------------------------------
+
+Original Author
+................................................................................
+
+Gerald Evenden (1935-2016)
+
+Maintainer(s)
+................................................................................
+
+Kristian Evers <kreve at sdfe.dk>
+Even Rouault <even.rouault at spatialys.com>
+
+
+Project Steering Committee
+--------------------------------------------------------------------------------
+
+Process and membership can be found at:
+https://proj4.org/community/rfc/rfc-1.html
+
+Chair
+................................................................................
+
+Kristian Evers <kreve at sdfe.dk>
+
+Members
+................................................................................
 
-Maintainer(s):
 Frank Warmerdam <warmerdam at pobox.com>
 Howard Butler <howard at hobu.co>
-
-Contributors:
-Brent Fraser <bfraser at geoanalytic.com>
-Chris Stuber <imap at chesapeake.net>
-Craig Bruce <cbruce at cubewerx.com>
-Victor Osipkov <vctos at email.com>
-Andrea Antonello <andrea.antonello at hydrologis.com>
 Charles Karney <charles.karney at sri.com>
-Karsten Engsager
-Knud Poder
-Kristian Evers <kreve at sdfe.dk>
 Thomas Knudsen <thokn at sdfe.dk>
 Even Rouault <even.rouault at spatialys.com>
+Kurt Schwehr <schwehr at gmail.com>
+
+Contributors
+--------------------------------------------------------------------------------
+
+The full list of contributors can be found on GitHub
+https://github.com/OSGeo/proj.4/graphs/contributors


=====================================
NEWS
=====================================
@@ -119,31 +119,36 @@ CRSs.
 
  o Fixed use of grid paths including spaces (#1152)
 
+ o Robinson: fix wrong values for forward path for latitudes >= 87.5 (#1172),
+   and fix inaccurate inverse method.
+
  THANKS TO
  ------------
 
  Version 6.0.0 is made possible by the following contributors:
 
  Aaron Puchert
+ Thomas Knudsen
  Phil Elson
  Mateusz Łoskot
  Markus Neteler
  Jürgen Fischer
- Howard Butler
  Charles Karney
+ Bas Couwenberg
+ Karoline Skaar
  Alan D. Snow
+ Howard Butler
  Marco Bernasocchi
- Karoline Skaar
  Ben Boeckel
  Ivan Veselov
- Mike Taves
  Philippe Rivière
+ Mike Taves
  Elliott Sales de Andrade
  Kai Pastor
  Kristian Evers
  Even Rouault
 
-5.2.0 Release Notes
+ 5.2.0 Release Notes
 -------------------
 
  UPDATES


=====================================
man/man1/projinfo.1
=====================================
@@ -144,7 +144,7 @@ only used for coordinate operation computation
 .TP
 .B \-\-spatial\-test contains|intersects
 Specify how the area of use of coordinate operations found in the database
-are compared to the area of use specfied explicitly with \fI\%\-\-area\fP or \fI\%\-\-bbox\fP,
+are compared to the area of use specified explicitly with \fI\%\-\-area\fP or \fI\%\-\-bbox\fP,
 or derivedi implictly from the area of use of the source and target CRS.
 By default, projinfo will only keep coordinate operations whose are of use
 is strictly within the area of interest (\fBcontains\fP strategy).


=====================================
src/iso19111/coordinateoperation.cpp
=====================================
@@ -2156,52 +2156,55 @@ void ParameterValue::_exportToWKT(io::WKTFormatter *formatter) const {
     const bool isWKT2 = formatter->version() == io::WKTFormatter::Version::WKT2;
 
     const auto &l_type = type();
-    const auto &l_value = value();
-    if (formatter->abridgedTransformation() && l_type == Type::MEASURE) {
-        const auto &unit = l_value.unit();
-        const auto &unitType = unit.type();
-        if (unitType == common::UnitOfMeasure::Type::LINEAR) {
-            formatter->add(l_value.getSIValue());
-        } else if (unitType == common::UnitOfMeasure::Type::ANGULAR) {
-            formatter->add(
-                l_value.convertToUnit(common::UnitOfMeasure::ARC_SECOND));
-        } else if (unit == common::UnitOfMeasure::PARTS_PER_MILLION) {
-            formatter->add(1.0 + l_value.value() * 1e-6);
-        } else {
-            formatter->add(l_value.value());
-        }
-    } else if (l_type == Type::MEASURE) {
-        const auto &unit = l_value.unit();
-        if (isWKT2) {
-            formatter->add(l_value.value());
-        } else {
-            // In WKT1, as we don't output the natural unit, output to the
-            // registered linear / angular unit.
+    if (l_type == Type::MEASURE) {
+        const auto &l_value = value();
+        if (formatter->abridgedTransformation()) {
+            const auto &unit = l_value.unit();
             const auto &unitType = unit.type();
             if (unitType == common::UnitOfMeasure::Type::LINEAR) {
-                const auto &targetUnit = *(formatter->axisLinearUnit());
-                if (targetUnit.conversionToSI() == 0.0) {
-                    throw io::FormattingException(
-                        "cannot convert value to target linear unit");
-                }
-                formatter->add(l_value.convertToUnit(targetUnit));
+                formatter->add(l_value.getSIValue());
             } else if (unitType == common::UnitOfMeasure::Type::ANGULAR) {
-                const auto &targetUnit = *(formatter->axisAngularUnit());
-                if (targetUnit.conversionToSI() == 0.0) {
-                    throw io::FormattingException(
-                        "cannot convert value to target angular unit");
-                }
-                formatter->add(l_value.convertToUnit(targetUnit));
+                formatter->add(
+                    l_value.convertToUnit(common::UnitOfMeasure::ARC_SECOND));
+            } else if (unit == common::UnitOfMeasure::PARTS_PER_MILLION) {
+                formatter->add(1.0 + l_value.value() * 1e-6);
             } else {
-                formatter->add(l_value.getSIValue());
+                formatter->add(l_value.value());
             }
-        }
-        if (isWKT2 && unit != common::UnitOfMeasure::NONE) {
-            if (!formatter->primeMeridianOrParameterUnitOmittedIfSameAsAxis() ||
-                (unit != common::UnitOfMeasure::SCALE_UNITY &&
-                 unit != *(formatter->axisLinearUnit()) &&
-                 unit != *(formatter->axisAngularUnit()))) {
-                unit._exportToWKT(formatter);
+        } else {
+            const auto &unit = l_value.unit();
+            if (isWKT2) {
+                formatter->add(l_value.value());
+            } else {
+                // In WKT1, as we don't output the natural unit, output to the
+                // registered linear / angular unit.
+                const auto &unitType = unit.type();
+                if (unitType == common::UnitOfMeasure::Type::LINEAR) {
+                    const auto &targetUnit = *(formatter->axisLinearUnit());
+                    if (targetUnit.conversionToSI() == 0.0) {
+                        throw io::FormattingException(
+                            "cannot convert value to target linear unit");
+                    }
+                    formatter->add(l_value.convertToUnit(targetUnit));
+                } else if (unitType == common::UnitOfMeasure::Type::ANGULAR) {
+                    const auto &targetUnit = *(formatter->axisAngularUnit());
+                    if (targetUnit.conversionToSI() == 0.0) {
+                        throw io::FormattingException(
+                            "cannot convert value to target angular unit");
+                    }
+                    formatter->add(l_value.convertToUnit(targetUnit));
+                } else {
+                    formatter->add(l_value.getSIValue());
+                }
+            }
+            if (isWKT2 && unit != common::UnitOfMeasure::NONE) {
+                if (!formatter
+                         ->primeMeridianOrParameterUnitOmittedIfSameAsAxis() ||
+                    (unit != common::UnitOfMeasure::SCALE_UNITY &&
+                     unit != *(formatter->axisLinearUnit()) &&
+                     unit != *(formatter->axisAngularUnit()))) {
+                    unit._exportToWKT(formatter);
+                }
             }
         }
     } else if (l_type == Type::STRING || l_type == Type::FILENAME) {


=====================================
src/jniproj.cpp
=====================================
@@ -279,7 +279,7 @@ JNIEXPORT jcharArray JNICALL Java_org_proj4_PJ_getAxisDirections
 {
     PJ *pj = getPJ(env, object);
     if (pj) {
-        int length = strlen(pj->axis);
+        int length = static_cast<int>(strlen(pj->axis));
         jcharArray array = env->NewCharArray(length);
         if (array) {
             jchar* axis = env->GetCharArrayElements(array, nullptr);


=====================================
src/projections/robin.cpp
=====================================
@@ -7,7 +7,7 @@
 PROJ_HEAD(robin, "Robinson") "\n\tPCyl, Sph";
 
 #define V(C,z) (C.c0 + z * (C.c1 + z * (C.c2 + z * C.c3)))
-#define DV(C,z) (C.c1 + z * (C.c2 + C.c2 + z * 3. * C.c3))
+#define DV(C,z) (C.c1 + 2 * z * C.c2 + z * z * 3. * C.c3)
 
 /*
 note: following terms based upon 5 deg. intervals in degrees.
@@ -74,7 +74,7 @@ static const struct COEFS Y[] = {
 #define RC1 0.08726646259971647884
 #define NODES   18
 #define ONEEPS  1.000001
-#define EPS 1e-8
+#define EPS 1e-10
 /* Not sure at all of the appropriate number for MAX_ITER... */
 #define MAX_ITER 100
 
@@ -90,7 +90,7 @@ static PJ_XY s_forward (PJ_LP lp, PJ *P) {           /* Spheroidal, forward */
         proj_errno_set(P, PJD_ERR_TOLERANCE_CONDITION);
         return xy;
     }
-    if (i >= NODES) i = NODES - 1;
+    if (i >= NODES) i = NODES;
     dphi = RAD_TO_DEG * (dphi - RC1 * i);
     xy.x = V(X[i], dphi) * FXC * lp.lam;
     xy.y = V(Y[i], dphi) * FYC;
@@ -133,10 +133,8 @@ static PJ_LP s_inverse (PJ_XY xy, PJ *P) {           /* Spheroidal, inverse */
         T = Y[i];
         /* first guess, linear interp */
         t = 5. * (lp.phi - T.c0)/(Y[i+1].c0 - T.c0);
-        /* make into root */
-        T.c0 = (float)(T.c0 - lp.phi);
         for (iters = MAX_ITER; iters ; --iters) { /* Newton-Raphson */
-            t -= t1 = V(T,t) / DV(T,t);
+            t -= t1 = (V(T,t) - lp.phi) / DV(T,t);
             if (fabs(t1) < EPS)
                 break;
         }


=====================================
src/projections/sch.cpp
=====================================
@@ -215,7 +215,7 @@ PJ *PROJECTION(sch) {
         return pj_default_destructor(P, PJD_ERR_FAILED_TO_FIND_PROJ);
     }
 
-    /* Check if peg latitude is defined */
+    /* Check if peg heading is defined */
     if (pj_param(P->ctx, P->params, "tphdg_0").i)
         Q->phdg = pj_param(P->ctx, P->params, "rphdg_0").f;
     else {


=====================================
test/cli/Makefile.am
=====================================
@@ -1,5 +1,5 @@
 # Executables paths passed to test scripts
-DATAPATH = ../../data
+PROJ_LIB ?= ../../data
 THIS_DIR = $(top_srcdir)/test/cli
 EXEPATH = ../../src
 PROJEXE = $(EXEPATH)/proj
@@ -27,7 +27,7 @@ EXTRA_DIST = pj_out27.dist pj_out83.dist td_out.dist \
 		CMakeLists.txt
 
 testprojinfo-check:
-	PROJ_LIB=$(DATAPATH) $(TESTPROJINFO) $(PROJINFOEXE)
+	PROJ_LIB=$(PROJ_LIB) $(TESTPROJINFO) $(PROJINFOEXE)
 
 test27-check:
 	$(TEST27) $(PROJEXE)
@@ -36,24 +36,24 @@ test83-check:
 	$(TEST83) $(PROJEXE)
 
 testvarious-check:
-	PROJ_LIB=$(DATAPATH) $(TESTVARIOUS) $(CS2CSEXE)
+	PROJ_LIB=$(PROJ_LIB) $(TESTVARIOUS) $(CS2CSEXE)
 
 testdatumfile-check:
-	@if [ -f $(DATAPATH)/conus -a -f $(DATAPATH)/ntv1_can.dat -a -f $(DATAPATH)/MD -a -f $(DATAPATH)/ntf_r93.gsb ]; then \
-	  PROJ_LIB=$(DATAPATH) $(TESTDATUMFILE) $(CS2CSEXE) ; \
+	@if [ -f $(PROJ_LIB)/conus -a -f $(PROJ_LIB)/ntv1_can.dat -a -f $(PROJ_LIB)/MD -a -f $(PROJ_LIB)/ntf_r93.gsb ]; then \
+	  PROJ_LIB=$(PROJ_LIB) $(TESTDATUMFILE) $(CS2CSEXE) ; \
 	fi
 
 testign-check:
-	@if [ -f $(DATAPATH)/ntf_r93.gsb ] ; then \
-	  PROJ_LIB=$(DATAPATH) $(TESTIGN) $(CS2CSEXE) ; \
+	@if [ -f $(PROJ_LIB)/ntf_r93.gsb ] ; then \
+	  PROJ_LIB=$(PROJ_LIB) $(TESTIGN) $(CS2CSEXE) ; \
 	fi
 
 testntv2-check:
-	@if [ -f $(DATAPATH)/ntv2_0.gsb ] ; then \
-	  PROJ_LIB=$(DATAPATH) $(TESTNTV2) $(CS2CSEXE) ; \
+	@if [ -f $(PROJ_LIB)/ntv2_0.gsb ] ; then \
+	  PROJ_LIB=$(PROJ_LIB) $(TESTNTV2) $(CS2CSEXE) ; \
 	fi
 
 testcct-check:
-	PROJ_LIB=$(DATAPATH) $(TESTCCT) $(CCTEXE)
+	PROJ_LIB=$(PROJ_LIB) $(TESTCCT) $(CCTEXE)
 
 check-local: testprojinfo-check test27-check test83-check testvarious-check testdatumfile-check testign-check testntv2-check testcct-check


=====================================
test/cli/Makefile.in
=====================================
@@ -260,9 +260,6 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-
-# Executables paths passed to test scripts
-DATAPATH = ../../data
 THIS_DIR = $(top_srcdir)/test/cli
 EXEPATH = ../../src
 PROJEXE = $(EXEPATH)/proj
@@ -485,8 +482,11 @@ uninstall-am:
 .PRECIOUS: Makefile
 
 
+# Executables paths passed to test scripts
+PROJ_LIB ?= ../../data
+
 testprojinfo-check:
-	PROJ_LIB=$(DATAPATH) $(TESTPROJINFO) $(PROJINFOEXE)
+	PROJ_LIB=$(PROJ_LIB) $(TESTPROJINFO) $(PROJINFOEXE)
 
 test27-check:
 	$(TEST27) $(PROJEXE)
@@ -495,25 +495,25 @@ test83-check:
 	$(TEST83) $(PROJEXE)
 
 testvarious-check:
-	PROJ_LIB=$(DATAPATH) $(TESTVARIOUS) $(CS2CSEXE)
+	PROJ_LIB=$(PROJ_LIB) $(TESTVARIOUS) $(CS2CSEXE)
 
 testdatumfile-check:
-	@if [ -f $(DATAPATH)/conus -a -f $(DATAPATH)/ntv1_can.dat -a -f $(DATAPATH)/MD -a -f $(DATAPATH)/ntf_r93.gsb ]; then \
-	  PROJ_LIB=$(DATAPATH) $(TESTDATUMFILE) $(CS2CSEXE) ; \
+	@if [ -f $(PROJ_LIB)/conus -a -f $(PROJ_LIB)/ntv1_can.dat -a -f $(PROJ_LIB)/MD -a -f $(PROJ_LIB)/ntf_r93.gsb ]; then \
+	  PROJ_LIB=$(PROJ_LIB) $(TESTDATUMFILE) $(CS2CSEXE) ; \
 	fi
 
 testign-check:
-	@if [ -f $(DATAPATH)/ntf_r93.gsb ] ; then \
-	  PROJ_LIB=$(DATAPATH) $(TESTIGN) $(CS2CSEXE) ; \
+	@if [ -f $(PROJ_LIB)/ntf_r93.gsb ] ; then \
+	  PROJ_LIB=$(PROJ_LIB) $(TESTIGN) $(CS2CSEXE) ; \
 	fi
 
 testntv2-check:
-	@if [ -f $(DATAPATH)/ntv2_0.gsb ] ; then \
-	  PROJ_LIB=$(DATAPATH) $(TESTNTV2) $(CS2CSEXE) ; \
+	@if [ -f $(PROJ_LIB)/ntv2_0.gsb ] ; then \
+	  PROJ_LIB=$(PROJ_LIB) $(TESTNTV2) $(CS2CSEXE) ; \
 	fi
 
 testcct-check:
-	PROJ_LIB=$(DATAPATH) $(TESTCCT) $(CCTEXE)
+	PROJ_LIB=$(PROJ_LIB) $(TESTCCT) $(CCTEXE)
 
 check-local: testprojinfo-check test27-check test83-check testvarious-check testdatumfile-check testign-check testntv2-check testcct-check
 


=====================================
test/cli/test27
=====================================
@@ -7,7 +7,6 @@
 #   Mercator due to greater precision of meridional distance function.
 #
 TEST_CLI_DIR=`dirname $0`
-DATA_DIR=`dirname $0`/../../data
 EXE=$1
 
 usage()
@@ -26,12 +25,16 @@ if test ! -x ${EXE}; then
     exit 1
 fi
 
+if test -z "${PROJ_LIB}"; then
+    export PROJ_LIB="`dirname $0`/../../data"
+fi
+
 echo "============================================"
 echo "Running ${0} using ${EXE}:"
 echo "============================================"
 
 OUT=proj_out27
-INIT_FILE=${DATA_DIR}/nad27
+INIT_FILE=${PROJ_LIB}/nad27
 #
 echo "doing tests into file ${OUT}, please wait"
 #


=====================================
test/cli/test83
=====================================
@@ -8,7 +8,6 @@
 #   Mercator due to greater precision of meridional distance function.
 #
 TEST_CLI_DIR=`dirname $0`
-DATA_DIR=`dirname $0`/../../data
 EXE=$1
 
 usage()
@@ -27,12 +26,16 @@ if test ! -x ${EXE}; then
     exit 1
 fi
 
+if test -z "${PROJ_LIB}"; then
+    export PROJ_LIB="`dirname $0`/../../data"
+fi
+
 echo "============================================"
 echo "Running ${0} using ${EXE}:"
 echo "============================================"
 
 OUT=proj_out83
-INIT_FILE=${DATA_DIR}/nad83
+INIT_FILE=${PROJ_LIB}/nad83
 #
 echo "doing tests into file ${OUT}, please wait"
 #


=====================================
test/cli/testIGNF
=====================================
@@ -12,7 +12,6 @@
 #               the gsb grid is still ok
 
 TEST_CLI_DIR=`dirname $0`
-DATA_DIR=`dirname $0`/../../data
 EXE=$1
 
 usage()
@@ -32,7 +31,7 @@ if test ! -x ${EXE}; then
 fi
 
 if test -z "${PROJ_LIB}"; then
-    export PROJ_LIB=${DATA_DIR}
+    export PROJ_LIB="`dirname $0`/../../data"
 fi
 
 echo "============================================"


=====================================
test/cli/testcct
=====================================
@@ -2,7 +2,6 @@
 # Test cct
 
 TEST_CLI_DIR=`dirname $0`
-DATA_DIR=`dirname $0`/../../data
 EXE=$1
 
 usage()


=====================================
test/cli/testdatumfile
=====================================
@@ -4,7 +4,6 @@
 #
 #
 TEST_CLI_DIR=`dirname $0`
-DATA_DIR=`dirname $0`/../../data
 EXE=$1
 
 usage()


=====================================
test/cli/testflaky
=====================================
@@ -4,7 +4,6 @@
 #
 #
 TEST_CLI_DIR=`dirname $0`
-DATA_DIR=`dirname $0`/../../data
 EXE=$1
 
 usage()


=====================================
test/cli/testntv2
=====================================
@@ -4,7 +4,6 @@
 #
 #
 TEST_CLI_DIR=`dirname $0`
-DATA_DIR=`dirname $0`/../../data
 EXE=$1
 
 usage()


=====================================
test/cli/testprojinfo
=====================================
@@ -2,7 +2,6 @@
 # Test projinfo
 
 TEST_CLI_DIR=`dirname $0`
-DATA_DIR=`dirname $0`/../../data
 EXE=$1
 
 usage()


=====================================
test/cli/testvarious
=====================================
@@ -4,7 +4,6 @@
 #
 #
 TEST_CLI_DIR=`dirname $0`
-DATA_DIR=`dirname $0`/../../data
 EXE=$1
 
 usage()
@@ -24,7 +23,7 @@ if test ! -x ${EXE}; then
 fi
 
 if test -z "${PROJ_LIB}"; then
-    export PROJ_LIB=$DATA_DIR
+    export PROJ_LIB="`dirname $0`/../../data"
 fi
 
 # Would be great to have a universale way of selecting a locale with


=====================================
test/gie/builtins.gie
=====================================
@@ -4438,7 +4438,7 @@ Robinson
 ===============================================================================
 
 -------------------------------------------------------------------------------
-operation +proj=robin   +a=6400000    +lat_1=0.5 +lat_2=2
+operation +proj=robin   +a=6400000
 -------------------------------------------------------------------------------
 tolerance 0.1 mm
 accept  2 1
@@ -4450,6 +4450,18 @@ expect  -189588.423282508 107318.530350703
 accept  -2 -1
 expect  -189588.423282508 -107318.530350703
 
+accept  0 89.5
+expect  0.000000000000   8639799.718722090125
+
+accept  0 90
+expect  0.000000000000   8654720.000000000000
+
+accept  0 -89.5
+expect  0.000000000000   -8639799.718722090125
+
+accept  0 -90
+expect  0.000000000000   -8654720.000000000000
+
 direction inverse
 accept  200 100
 expect  0.002109689 0.000931806
@@ -4460,6 +4472,18 @@ expect  -0.002109689 0.000931806
 accept  -200 -100
 expect  -0.002109689 -0.000931806
 
+accept  0.000000000000   8639799.718722090125
+expect  0 89.5
+
+accept  0.000000000000   8654720.000000000000
+expect  0 90
+
+accept  0.000000000000   -8639799.718722090125
+expect  0 -89.5
+
+accept  0.000000000000   -8654720.000000000000
+expect  0 -90
+
 
 ===============================================================================
 Roussilhe Stereographic



View it on GitLab: https://salsa.debian.org/debian-gis-team/proj/commit/656f08adc3cd5ad667a6ddf7f99abe9ceea1264e

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/proj/commit/656f08adc3cd5ad667a6ddf7f99abe9ceea1264e
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20190225/47c3f3fc/attachment-0001.html>


More information about the Pkg-grass-devel mailing list