Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Apr 23, 2018
2 parents 2966800 + 9ea259c commit fff3b84
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion doc/stages/filters.delaunay.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dimensions of the point cloud.

.. _Geogram: http://alice.loria.fr/software/geogram/doc/html/index.html

.. embed::
.. plugin::

Example
-------
Expand Down
5 changes: 5 additions & 0 deletions io/GeotiffSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#include <geo_normalize.h>
#include <geo_simpletags.h>

#include <cpl_conv.h>

PDAL_C_START

// These functions are available from GDAL, but they
Expand Down Expand Up @@ -146,7 +148,10 @@ GeotiffSrs::GeotiffSrs(const std::vector<uint8_t>& directoryRec,
{
char *wkt = GTIFGetOGISDefn(ctx.gtiff, &sGTIFDefn);
if (wkt)
{
m_srs.set(wkt);
VSIFree(wkt);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion io/LasWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class PDAL_DLL LasWriter : public FlexWriter, public Streamable
std::string m_curFilename;
StringList m_forwardSpec;
std::set<std::string> m_forwards;
bool m_forwardVlrs;
bool m_forwardVlrs = false;
LasCompression m_compression;
std::vector<char> m_pointBuf;
SpatialReference m_aSrs;
Expand Down
2 changes: 1 addition & 1 deletion pdal/XMLSchema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ bool XMLSchema::load(xmlDocPtr doc)
xmlChar* n = xmlGetProp(properties, (const xmlChar*) "value");
if (!n)
{
return false;
std::cerr << "Unable to fetch minimum value.\n";
return false;
}
dim.m_min = std::atof((const char*)n);
xmlFree(n);
Expand Down
2 changes: 0 additions & 2 deletions plugins/matlab/filters/Script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ PointLayoutPtr Script::getStructLayout(mxArray* array, LogPtr log)
mt == mxINT16_CLASS ||
mt == mxUINT16_CLASS ||
mt == mxINT32_CLASS ||
mt == mxDOUBLE_CLASS ||
mt == mxINT32_CLASS ||
mt == mxUINT32_CLASS ||
mt == mxINT64_CLASS ||
mt == mxUINT64_CLASS )
Expand Down
4 changes: 3 additions & 1 deletion test/unit/filters/FerryFilterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ TEST(FerryFilterTest, test_ferry_copy_json)
double y = view->getFieldAs<double>(state_plane_y, 0);

EXPECT_DOUBLE_EQ(-117.2501328350574, lon);
EXPECT_DOUBLE_EQ(49.341077824192915, lat);
// proj 5 will consider +ellps=GRS80 +towgs84=0,0,0 to be slighly different
// than +datum=WGS84 and return 49.341077823260804.
EXPECT_NEAR(49.341077824192915, lat, 1e-9);
EXPECT_DOUBLE_EQ(637012.24, x);
EXPECT_DOUBLE_EQ(849028.31, y);
}
Expand Down
10 changes: 8 additions & 2 deletions test/unit/filters/ReprojectionFilterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ TEST(ReprojectionFilterTest, ReprojectionFilterTest_test_1)

const double postX = -93.351563;
const double postY = 41.577148;
// proj 4 transformed to 16 exactly, but proj 5 will consider
// +ellps=GRS80 +towgs84=0,0,0 to be slighly different than +datum=WGS84
// and return 15.999954
const double postZ = 16.000000;

{
Expand Down Expand Up @@ -93,7 +96,7 @@ TEST(ReprojectionFilterTest, ReprojectionFilterTest_test_1)

EXPECT_FLOAT_EQ(x, postX);
EXPECT_FLOAT_EQ(y, postY);
EXPECT_FLOAT_EQ(z, postZ);
EXPECT_NEAR(z, postZ, 5e-5);
}
}

Expand All @@ -120,13 +123,16 @@ TEST(ReprojectionFilterTest, stream_test_1)
static int i = 0;
const double x = -93.351563;
const double y = 41.577148;
// proj 4 transformed to 16 exactly, but proj 5 will consider
// +ellps=GRS80 +towgs84=0,0,0 to be slighly different than +datum=WGS84
// and return 15.999954
const double z = 16.000000;

if (i == 0)
{
EXPECT_FLOAT_EQ(point.getFieldAs<float>(Dimension::Id::X), x);
EXPECT_FLOAT_EQ(point.getFieldAs<float>(Dimension::Id::Y), y);
EXPECT_FLOAT_EQ(point.getFieldAs<float>(Dimension::Id::Z), z);
EXPECT_NEAR(point.getFieldAs<float>(Dimension::Id::Z), z, 5e-5);
}
++i;
return true;
Expand Down
2 changes: 1 addition & 1 deletion tools/lasdump/Vlr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Vlr
{
public:
bool matches(std::string userId, uint16_t recordId)
{ return userId == userId && recordId == m_recordId; }
{ return userId == m_userId && recordId == m_recordId; }
const char *data() const
{ return (const char *)m_data.data(); }
uint64_t dataLen() const
Expand Down

0 comments on commit fff3b84

Please sign in to comment.