Skip to content
Commits on Source (6)
......@@ -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,13 +70,16 @@ 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
# For out-of-tree builds, link all file of the source data dir to the generated data
check-local:
@if [ ! -f GL27 ]; then \
......
......@@ -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,10 +582,14 @@ 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
# For out-of-tree builds, link all file of the source data dir to the generated data
......
proj (6.0.0~rc4-1~exp1) experimental; urgency=medium
* New upstream release candidate.
* Update 6.0.0~rc3 symbols for other architectures.
* Update 6.0.0~rc4 symbols for amd64.
-- Bas Couwenberg <sebastic@debian.org> Wed, 27 Feb 2019 06:56:06 +0100
proj (6.0.0~rc3-1~exp1) experimental; urgency=medium
* New upstream release candidate.
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -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;
......
......@@ -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;
}
......
......@@ -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();
......
......@@ -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];
......
......@@ -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);
......
......@@ -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
......
......@@ -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
......
......@@ -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 */
......
......@@ -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;
......
......@@ -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
......