Compare commits

...
18 Commits
Author SHA1 Message Date
Even Rouault 53e93c2da6 Fix build issues on Solaris 2019-02-26 22:51:12 +01:00
Even Rouault 79b8794d69 data/Makefile.am: fix to avoid issue on Solaris 2019-02-26 22:51:12 +01:00
Even Rouault 4adaf389d8 Rename internal constant to avoid conflict with macro in Solaris system headers 2019-02-26 22:51:12 +01:00
Even Rouault 919f143796 io.cpp: cast to 'unsigned char' before isspace() to avoid undefined behaviour, for example on netBSD 8 2019-02-26 22:51:11 +01:00
Even Rouault ab404bb18c builtins.gie: relax toleranc on +proj=tpeqd for netBSD8/g++-5.5/amd64 2019-02-26 22:51:11 +01:00
Even Rouault be5e719260 mutex.cpp: remove _XOPEN_SOURCE definition that causes compilation problem on netBSD 8 and is useless on Linux 2019-02-26 22:51:11 +01:00
Kristian Evers c40c91610e Update NEWS with latest contributors [skip ci] 2019-02-25 19:36:05 +01:00
Even Rouault 88717da6ec NEWS: update for latest Robinson fix [ci skip] 2019-02-25 11:27:06 +01:00
Even Rouault 0a9006e593 Doc: fix plotdefs.json, and aea and lcc descriptions, to take into account removal of proj_def.dat 2019-02-24 20:30:49 +01:00
Kristian Evers 78e71721da Merge remote-tracking branch 'osgeo/master' into 6.0 2019-02-24 20:01:59 +01:00
Thomas Knudsen a5bef579e4 Some improvements to the docs for tmerc and omerc (#1281) 2019-02-24 14:22:14 +01:00
Kristian Evers 75a54f4f6c Merge remote-tracking branch 'osgeo/master' into 6.0 2019-02-24 14:06:27 +01:00
Even Rouault 135612cf90 ParameterValue::_exportToWKT(): fix null pointer dereference with -D_GLIBCXX_ASSERTIONS on WKT with PARAMETERFILE (fixes #1290) 2019-02-24 12:46:03 +01:00
Even Rouault 8c8b2ecee7 jniproj.cpp: fix compiler warning 2019-02-24 12:46:03 +01:00
Even Rouault ad196087b3 .travis.yml: add build with g++-7 and -D_GLIBCXX_ASSERTIONS (refs #1290) 2019-02-24 12:46:03 +01:00
Bas Couwenberg 159e500be0 Fix spelling errors.
* specfied -> specified
2019-02-23 12:42:23 +01:00
Even Rouault c19a181614 proj.db: update to EPSG 9.6.0
Minor update w.r.t 9.5.5 that adds a few new coordinate operations.
2019-02-22 19:18:45 +01:00
Mike Taves d2541557e4 CMake warning about second proj_config.h 2019-02-22 13:04:42 +01:00
15 changed files with 69 additions and 56 deletions
+10 -5
View File
@@ -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
Alan D. Snow
Marco Bernasocchi
Bas Couwenberg
Karoline Skaar
Alan D. Snow
Howard Butler
Marco Bernasocchi
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
+6 -2
View File
@@ -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:
+4 -2
View File
@@ -6,7 +6,8 @@
"lonmax": 180,
"lonmin": -180,
"name": "aea",
"projstring": "+proj=aea",
"#comment": "lat_1 and lat_2 values are previous defaults from now-removed proj_def.dat",
"projstring": "+proj=aea +lat_1=29.5 +lat_2=42.5",
"res": "low",
"type": "poly"
},
@@ -623,7 +624,8 @@
"lonmax": -10,
"lonmin": -160,
"name": "lcc",
"projstring": "+proj=lcc +lon_0=-90",
"#comment": "lat_1 and lat_2 values are previous defaults from now-removed proj_def.dat",
"projstring": "+proj=lcc +lon_0=-90 +lat_1=33 +lat_2=45",
"res": "med",
"type": "poly"
},
+6 -2
View File
@@ -25,17 +25,21 @@ Albers Equal Area
:align: center
:alt: Albers Equal Area
proj-string: ``+proj=aea``
proj-string: ``+proj=aea +lat_1=29.5 +lat_2=42.5``
Options
################################################################################
.. note:: All options are optional for the Albers Equal Area projection.
Required
--------------------------------------------------------------------------------
.. include:: ../options/lat_1.rst
.. include:: ../options/lat_2.rst
Optional
--------------------------------------------------------------------------------
.. include:: ../options/lon_0.rst
.. include:: ../options/ellps.rst
+8 -4
View File
@@ -42,19 +42,23 @@ justifies adding this otherwise non-standard projection.
:align: center
:alt: Lambert Conformal Conic
proj-string: ``+proj=lcc +lon_0=-90``
proj-string: ``+proj=lcc +lon_0=-90 +lat_1=33 +lat_2=45``
Parameters
################################################################################
.. note:: All parameters are optional for the projection.
Required
--------------------------------------------------------------------------------
.. include:: ../options/lat_1.rst
Optional
--------------------------------------------------------------------------------
.. include:: ../options/lon_0.rst
.. include:: ../options/lat_0.rst
.. include:: ../options/lat_1.rst
.. include:: ../options/lat_2.rst
.. include:: ../options/ellps.rst
+2 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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();
+26 -25
View File
@@ -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];
+1 -1
View File
@@ -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);
-8
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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 */
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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