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

Bas Couwenberg gitlab at salsa.debian.org
Wed Feb 27 06:37:49 GMT 2019


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


Commits:
1a1435f7 by Bas Couwenberg at 2019-02-27T05:51:39Z
New upstream version 6.0.0~rc4
- - - - -


12 changed files:

- data/Makefile.am
- data/Makefile.in
- include/proj/internal/io_internal.hpp
- src/apps/proj_strtod.cpp
- src/iso19111/coordinatesystem.cpp
- src/iso19111/io.cpp
- src/iso19111/static.cpp
- src/mutex.cpp
- src/projections/eqearth.cpp
- src/projections/igh.cpp
- src/projections/isea.cpp
- test/gie/builtins.gie


Changes:

=====================================
data/Makefile.am
=====================================
@@ -56,6 +56,7 @@ install-data-local:
           fi; \
 	done
 
+# head -c1 not handled on Solaris
 proj.db: $(DATAPATH)/sql/*.sql
 	@echo "Make proj.db"
 	$(RM) proj.db
@@ -69,12 +70,15 @@ proj.db: $(DATAPATH)/sql/*.sql
 		$(RM) proj.db; \
 		exit 1; \
 	fi; \
+	echo "" | head -c1; \
+        if [ $$? -eq 0 ] ; then \
+         echo "Running foreign_key_check"; \ 
 	 if [[ $$(echo "pragma foreign_key_check;" | sqlite3 proj.db | head -c1 | wc -c) -ne 0 ]]; then \
 		echo "Foreign key check failed"; \
 		$(RM) proj.db; \
 		exit 1; \
-	 fi
-
+	 fi \
+	fi
 
 # For out-of-tree builds, link all file of the source data dir to the generated data
 check-local:


=====================================
data/Makefile.in
=====================================
@@ -568,6 +568,7 @@ install-data-local:
           fi; \
 	done
 
+# head -c1 not handled on Solaris
 proj.db: $(DATAPATH)/sql/*.sql
 	@echo "Make proj.db"
 	$(RM) proj.db
@@ -581,11 +582,15 @@ proj.db: $(DATAPATH)/sql/*.sql
 		$(RM) proj.db; \
 		exit 1; \
 	fi; \
+	echo "" | head -c1; \
+        if [ $$? -eq 0 ] ; then \
+         echo "Running foreign_key_check"; \
 	 if [[ $$(echo "pragma foreign_key_check;" | sqlite3 proj.db | head -c1 | wc -c) -ne 0 ]]; then \
 		echo "Foreign key check failed"; \
 		$(RM) proj.db; \
 		exit 1; \
-	 fi
+	 fi \
+	fi
 
 # For out-of-tree builds, link all file of the source data dir to the generated data
 check-local:


=====================================
include/proj/internal/io_internal.hpp
=====================================
@@ -76,7 +76,8 @@ class WKTConstants {
     static const std::string SCALEUNIT;
     static const std::string TIMEUNIT;
     static const std::string ELLIPSOID;
-    static const std::string CS;
+    // underscore, since there is a CS macro in Solaris system headers
+    static const std::string CS_;
     static const std::string ID;
     static const std::string PROJCRS;
     static const std::string BASEGEODCRS;


=====================================
src/apps/proj_strtod.cpp
=====================================
@@ -309,7 +309,7 @@ double proj_strtod(const char *str, char **endptr) {
         number = exponent < 0? number / ex: number * ex;
     }
     else
-        number *= pow (10, exponent);
+        number *= pow (10.0, static_cast<double>(exponent));
 
     return number;
 }


=====================================
src/iso19111/coordinatesystem.cpp
=====================================
@@ -483,7 +483,7 @@ void CoordinateSystem::_exportToWKT(
 
     const auto &l_axisList = axisList();
     if (isWKT2) {
-        formatter->startNode(io::WKTConstants::CS, !identifiers().empty());
+        formatter->startNode(io::WKTConstants::CS_, !identifiers().empty());
         formatter->add(getWKT2Type(formatter->use2018Keywords()));
         formatter->add(static_cast<int>(l_axisList.size()));
         formatter->endNode();


=====================================
src/iso19111/io.cpp
=====================================
@@ -973,7 +973,7 @@ const std::vector<WKTNodeNNPtr> &WKTNode::children() const {
 //! @cond Doxygen_Suppress
 static size_t skipSpace(const std::string &str, size_t start) {
     size_t i = start;
-    while (i < str.size() && ::isspace(str[i])) {
+    while (i < str.size() && ::isspace(static_cast<unsigned char>(str[i]))) {
         ++i;
     }
     return i;
@@ -1002,8 +1002,9 @@ WKTNodeNNPtr WKTNode::createFrom(const std::string &wkt, size_t indexStart,
     bool inString = false;
 
     for (; i < wkt.size() &&
-           (inString || (wkt[i] != '[' && wkt[i] != '(' && wkt[i] != ',' &&
-                         wkt[i] != ']' && wkt[i] != ')' && !::isspace(wkt[i])));
+           (inString ||
+            (wkt[i] != '[' && wkt[i] != '(' && wkt[i] != ',' && wkt[i] != ']' &&
+             wkt[i] != ')' && !::isspace(static_cast<unsigned char>(wkt[i]))));
          ++i) {
         if (wkt[i] == '"') {
             if (!inString) {
@@ -2556,13 +2557,13 @@ WKTParser::Private::buildGeodeticCRS(const WKTNodeNNPtr &node) {
 
     auto &dynamicNode = nodeP->lookForChild(WKTConstants::DYNAMIC);
 
-    auto &csNode = nodeP->lookForChild(WKTConstants::CS);
+    auto &csNode = nodeP->lookForChild(WKTConstants::CS_);
     const auto &nodeName = nodeP->value();
     if (isNull(csNode) && !ci_equal(nodeName, WKTConstants::GEOGCS) &&
         !ci_equal(nodeName, WKTConstants::GEOCCS) &&
         !ci_equal(nodeName, WKTConstants::BASEGEODCRS) &&
         !ci_equal(nodeName, WKTConstants::BASEGEOGCRS)) {
-        ThrowMissing(WKTConstants::CS);
+        ThrowMissing(WKTConstants::CS_);
     }
 
     auto &primeMeridianNode =
@@ -2712,9 +2713,9 @@ CRSNNPtr WKTParser::Private::buildDerivedGeodeticCRS(const WKTNodeNNPtr &node) {
     auto derivingConversion = buildConversion(
         derivingConversionNode, UnitOfMeasure::NONE, UnitOfMeasure::NONE);
 
-    auto &csNode = nodeP->lookForChild(WKTConstants::CS);
+    auto &csNode = nodeP->lookForChild(WKTConstants::CS_);
     if (isNull(csNode)) {
-        ThrowMissing(WKTConstants::CS);
+        ThrowMissing(WKTConstants::CS_);
     }
     auto cs = buildCS(csNode, node, UnitOfMeasure::NONE);
 
@@ -3539,11 +3540,11 @@ WKTParser::Private::buildProjectedCRS(const WKTNodeNNPtr &node) {
             ? buildConversion(conversionNode, linearUnit, angularUnit)
             : buildProjection(node, projectionNode, linearUnit, angularUnit);
 
-    auto &csNode = nodeP->lookForChild(WKTConstants::CS);
+    auto &csNode = nodeP->lookForChild(WKTConstants::CS_);
     const auto &nodeValue = nodeP->value();
     if (isNull(csNode) && !ci_equal(nodeValue, WKTConstants::PROJCS) &&
         !ci_equal(nodeValue, WKTConstants::BASEPROJCRS)) {
-        ThrowMissing(WKTConstants::CS);
+        ThrowMissing(WKTConstants::CS_);
     }
     auto cs = buildCS(csNode, node, UnitOfMeasure::NONE);
     auto cartesianCS = nn_dynamic_pointer_cast<CartesianCS>(cs);
@@ -3726,11 +3727,11 @@ CRSNNPtr WKTParser::Private::buildVerticalCRS(const WKTNodeNNPtr &node) {
             ? buildDatumEnsemble(ensembleNode, nullptr, false).as_nullable()
             : nullptr;
 
-    auto &csNode = nodeP->lookForChild(WKTConstants::CS);
+    auto &csNode = nodeP->lookForChild(WKTConstants::CS_);
     const auto &nodeValue = nodeP->value();
     if (isNull(csNode) && !ci_equal(nodeValue, WKTConstants::VERT_CS) &&
         !ci_equal(nodeValue, WKTConstants::BASEVERTCRS)) {
-        ThrowMissing(WKTConstants::CS);
+        ThrowMissing(WKTConstants::CS_);
     }
     auto cs = buildCS(csNode, node, UnitOfMeasure::NONE);
     auto verticalCS = nn_dynamic_pointer_cast<VerticalCS>(cs);
@@ -3787,9 +3788,9 @@ WKTParser::Private::buildDerivedVerticalCRS(const WKTNodeNNPtr &node) {
     auto derivingConversion = buildConversion(
         derivingConversionNode, UnitOfMeasure::NONE, UnitOfMeasure::NONE);
 
-    auto &csNode = nodeP->lookForChild(WKTConstants::CS);
+    auto &csNode = nodeP->lookForChild(WKTConstants::CS_);
     if (isNull(csNode)) {
-        ThrowMissing(WKTConstants::CS);
+        ThrowMissing(WKTConstants::CS_);
     }
     auto cs = buildCS(csNode, node, UnitOfMeasure::NONE);
 
@@ -3892,10 +3893,10 @@ BoundCRSNNPtr WKTParser::Private::buildBoundCRS(const WKTNodeNNPtr &node) {
 TemporalCSNNPtr
 WKTParser::Private::buildTemporalCS(const WKTNodeNNPtr &parentNode) {
 
-    auto &csNode = parentNode->GP()->lookForChild(WKTConstants::CS);
+    auto &csNode = parentNode->GP()->lookForChild(WKTConstants::CS_);
     if (isNull(csNode) &&
         !ci_equal(parentNode->GP()->value(), WKTConstants::BASETIMECRS)) {
-        ThrowMissing(WKTConstants::CS);
+        ThrowMissing(WKTConstants::CS_);
     }
     auto cs = buildCS(csNode, parentNode, UnitOfMeasure::NONE);
     auto temporalCS = nn_dynamic_pointer_cast<TemporalCS>(cs);
@@ -3953,9 +3954,9 @@ WKTParser::Private::buildEngineeringCRS(const WKTNodeNNPtr &node) {
         throw ParsingException("Missing EDATUM / ENGINEERINGDATUM node");
     }
 
-    auto &csNode = nodeP->lookForChild(WKTConstants::CS);
+    auto &csNode = nodeP->lookForChild(WKTConstants::CS_);
     if (isNull(csNode) && !ci_equal(nodeP->value(), WKTConstants::BASEENGCRS)) {
-        ThrowMissing(WKTConstants::CS);
+        ThrowMissing(WKTConstants::CS_);
     }
 
     auto cs = buildCS(csNode, node, UnitOfMeasure::NONE);
@@ -3998,9 +3999,9 @@ WKTParser::Private::buildDerivedEngineeringCRS(const WKTNodeNNPtr &node) {
     auto derivingConversion = buildConversion(
         derivingConversionNode, UnitOfMeasure::NONE, UnitOfMeasure::NONE);
 
-    auto &csNode = nodeP->lookForChild(WKTConstants::CS);
+    auto &csNode = nodeP->lookForChild(WKTConstants::CS_);
     if (isNull(csNode)) {
-        ThrowMissing(WKTConstants::CS);
+        ThrowMissing(WKTConstants::CS_);
     }
     auto cs = buildCS(csNode, node, UnitOfMeasure::NONE);
 
@@ -4013,10 +4014,10 @@ WKTParser::Private::buildDerivedEngineeringCRS(const WKTNodeNNPtr &node) {
 ParametricCSNNPtr
 WKTParser::Private::buildParametricCS(const WKTNodeNNPtr &parentNode) {
 
-    auto &csNode = parentNode->GP()->lookForChild(WKTConstants::CS);
+    auto &csNode = parentNode->GP()->lookForChild(WKTConstants::CS_);
     if (isNull(csNode) &&
         !ci_equal(parentNode->GP()->value(), WKTConstants::BASEPARAMCRS)) {
-        ThrowMissing(WKTConstants::CS);
+        ThrowMissing(WKTConstants::CS_);
     }
     auto cs = buildCS(csNode, parentNode, UnitOfMeasure::NONE);
     auto parametricCS = nn_dynamic_pointer_cast<ParametricCS>(cs);
@@ -4086,9 +4087,9 @@ WKTParser::Private::buildDerivedProjectedCRS(const WKTNodeNNPtr &node) {
 
     auto conversion = buildConversion(conversionNode, linearUnit, angularUnit);
 
-    auto &csNode = nodeP->lookForChild(WKTConstants::CS);
+    auto &csNode = nodeP->lookForChild(WKTConstants::CS_);
     if (isNull(csNode) && !ci_equal(nodeP->value(), WKTConstants::PROJCS)) {
-        ThrowMissing(WKTConstants::CS);
+        ThrowMissing(WKTConstants::CS_);
     }
     auto cs = buildCS(csNode, node, UnitOfMeasure::NONE);
     return DerivedProjectedCRS::create(buildProperties(node), baseProjCRS,
@@ -5317,7 +5318,7 @@ PROJStringSyntaxParser(const std::string &projString, std::vector<Step> &steps,
     {
         size_t i = 0;
         while (true) {
-            for (; isspace(c_str[i]); i++) {
+            for (; isspace(static_cast<unsigned char>(c_str[i])); i++) {
             }
             std::string token;
             bool in_string = false;
@@ -5334,7 +5335,7 @@ PROJStringSyntaxParser(const std::string &projString, std::vector<Step> &steps,
                     token += c_str[i];
                     i++;
                     continue;
-                } else if (isspace(c_str[i])) {
+                } else if (isspace(static_cast<unsigned char>(c_str[i]))) {
                     break;
                 }
                 token += c_str[i];


=====================================
src/iso19111/static.cpp
=====================================
@@ -215,7 +215,7 @@ DEFINE_WKT_CONSTANT(ANGLEUNIT);
 DEFINE_WKT_CONSTANT(SCALEUNIT);
 DEFINE_WKT_CONSTANT(TIMEUNIT);
 DEFINE_WKT_CONSTANT(ELLIPSOID);
-DEFINE_WKT_CONSTANT(CS);
+const std::string WKTConstants::CS_(createAndAddToConstantList("CS"));
 DEFINE_WKT_CONSTANT(ID);
 DEFINE_WKT_CONSTANT(PROJCRS);
 DEFINE_WKT_CONSTANT(BASEGEODCRS);


=====================================
src/mutex.cpp
=====================================
@@ -25,14 +25,6 @@
  * DEALINGS IN THE SOFTWARE.
  *****************************************************************************/
 
-
-/* projects.h and windows.h conflict - avoid this! */
-
-#if defined(MUTEX_pthread) && !defined(_XOPEN_SOURCE) && !defined(__sun)
-/* For pthread_mutexattr_settype */
-#define _XOPEN_SOURCE 500
-#endif
-
 /* For PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP */
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE


=====================================
src/projections/eqearth.cpp
=====================================
@@ -26,7 +26,7 @@ PROJ_HEAD(eqearth, "Equal Earth") "\n\tPCyl, Sph&Ell";
 #define A2 -0.081106
 #define A3 0.000893
 #define A4 0.003796
-#define M (sqrt(3) / 2.0)
+#define M (sqrt(3.0) / 2.0)
 
 #define MAX_Y 1.3173627591574  /* 90° latitude on a sphere with radius 1 */
 #define EPS 1e-11


=====================================
src/projections/igh.cpp
=====================================
@@ -77,7 +77,7 @@ static PJ_XY s_forward (PJ_LP lp, PJ *P) {           /* Spheroidal, forward */
 static PJ_LP s_inverse (PJ_XY xy, PJ *P) {           /* Spheroidal, inverse */
     PJ_LP lp = {0.0,0.0};
     struct pj_opaque *Q = static_cast<struct pj_opaque*>(P->opaque);
-    const double y90 = Q->dy0 + sqrt(2); /* lt=90 corresponds to y=y0+sqrt(2) */
+    const double y90 = Q->dy0 + sqrt(2.0); /* lt=90 corresponds to y=y0+sqrt(2) */
 
     int z = 0;
     if (xy.y > y90+EPSLN || xy.y < -y90+EPSLN) /* 0 */


=====================================
src/projections/isea.cpp
=====================================
@@ -847,7 +847,7 @@ static long isea_disn(struct isea_dgg *g, int quad, struct isea_pt *di) {
         return g->serial;
     }
     /* hexes in a quad */
-    hexes = lround(pow(g->aperture, g->resolution));
+    hexes = lround(pow(static_cast<double>(g->aperture), static_cast<double>(g->resolution)));
     if (quad == 11) {
         g->serial = 1 + 10 * hexes + 1;
         return g->serial;


=====================================
test/gie/builtins.gie
=====================================
@@ -5035,7 +5035,7 @@ Two Point Equidistant
 -------------------------------------------------------------------------------
 operation +proj=tpeqd   +ellps=GRS80  +lat_1=0.5 +lat_2=2 +n=0.5
 -------------------------------------------------------------------------------
-tolerance 0.15 mm
+tolerance 0.18 mm
 accept  2 1
 expect  -27750.758831679 -222599.403691777
 accept  2 -1



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

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/proj/commit/1a1435f70736cc5cc324bebc0df5c942fee3acef
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/20190227/d759b257/attachment-0001.html>


More information about the Pkg-grass-devel mailing list