Skip to content

Commit

Permalink
Add streaming capability to reprojection filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
connormanning committed Dec 6, 2015
1 parent 7ab0b3a commit 0534259
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions filters/reprojection/ReprojectionFilter.cpp
Expand Up @@ -241,5 +241,24 @@ void ReprojectionFilter::filter(PointView& view)
}
}

bool ReprojectionFilter::processOne(PointRef& point)
{
double x(point.getFieldAs<double>(Dimension::Id::X));
double y(point.getFieldAs<double>(Dimension::Id::Y));
double z(point.getFieldAs<double>(Dimension::Id::Z));

if (OCTTransform(m_transform_ptr, 1, &x, &y, &z))
{
point.setField(Dimension::Id::X, x);
point.setField(Dimension::Id::Y, y);
point.setField(Dimension::Id::Z, z);

return true;
}
else
{
return false;
}
}

} // namespace pdal
1 change: 1 addition & 0 deletions filters/reprojection/ReprojectionFilter.hpp
Expand Up @@ -64,6 +64,7 @@ class PDAL_DLL ReprojectionFilter : public Filter
virtual void initialize();
virtual PointViewSet run(PointViewPtr view);
virtual void filter(PointView& view);
virtual bool processOne(PointRef& point);

void updateBounds();
void createTransform(PointView *view);
Expand Down

0 comments on commit 0534259

Please sign in to comment.