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 545a440 + 98035cc commit 88c4f81
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 16 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
1 change: 0 additions & 1 deletion filters/ReprojectionFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ ReprojectionFilter::ReprojectionFilter()
, m_in_ref_ptr(NULL)
, m_out_ref_ptr(NULL)
, m_transform_ptr(NULL)
, m_errorHandler(new gdal::ErrorHandler())
{}


Expand Down
6 changes: 0 additions & 6 deletions filters/ReprojectionFilter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@
namespace pdal
{

namespace gdal
{
class ErrorHandler;
}

class PDAL_DLL ReprojectionFilter : public Filter, public Streamable
{
public:
Expand Down Expand Up @@ -74,7 +69,6 @@ class PDAL_DLL ReprojectionFilter : public Filter, public Streamable
ReferencePtr m_in_ref_ptr;
ReferencePtr m_out_ref_ptr;
TransformPtr m_transform_ptr;
gdal::ErrorHandler* m_errorHandler;

ReprojectionFilter& operator=(const ReprojectionFilter&); // not implemented
ReprojectionFilter(const ReprojectionFilter&); // not implemented
Expand Down
4 changes: 4 additions & 0 deletions io/GeotiffSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ PDAL_C_START
// aren't exported.
char PDAL_DLL * GTIFGetOGISDefn(GTIF*, GTIFDefn*);
int PDAL_DLL GTIFSetFromOGISDefn(GTIF*, const char*);
void VSIFree(void *data);

PDAL_C_END

Expand Down Expand Up @@ -146,7 +147,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: 2 additions & 0 deletions pdal/PointView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ class PDAL_DLL PointView : public PointContainer
{ return layout()->dimTypes(); }
inline PointLayoutPtr layout() const
{ return m_pointTable.layout(); }
inline PointTableRef table() const
{ return m_pointTable;}
SpatialReference spatialReference() const
{ return m_spatialReference; }

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 88c4f81

Please sign in to comment.