Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add statistics. #38

Merged
merged 3 commits into from
Jan 4, 2021
Merged

Add statistics. #38

merged 3 commits into from
Jan 4, 2021

Conversation

abellgithub
Copy link
Collaborator

No description provided.

@wonder-sk
Copy link
Contributor

Tested with PDAL 2.2 and it seems to work fine!

But I am having issues compiling it with PDAL 2.0.1

First I got

../bu/Processor.cpp: In member function ‘void untwine::bu::Processor::flushCompressed(pdal::PointTableRef, pdal::PointViewPtr, const untwine::bu::OctantInfo&, untwine::IndexedStats&)’:
../bu/Processor.cpp:378:28: error: invalid use of incomplete type ‘class pdal::PointViewIter’
  378 |         for (PointRef p : *view)
      |                            ^~~~
In file included from /usr/include/pdal/PipelineManager.hpp:38,
                 from /usr/include/pdal/Kernel.hpp:44,
                 from /usr/include/pdal/PluginHelper.hpp:43,
                 from /usr/include/pdal/Stage.hpp:45,
                 from /usr/include/pdal/StageFactory.hpp:38,
                 from ../bu/Processor.cpp:19:
/usr/include/pdal/PointView.hpp:61:7: note: forward declaration of ‘class pdal::PointViewIter’
   61 | class PointViewIter;
      |       ^~~~~~~~~~~~~
../bu/Processor.cpp:378:28: error: invalid use of incomplete type ‘class pdal::PointViewIter’
  378 |         for (PointRef p : *view)
      |                            ^~~~
In file included from /usr/include/pdal/PipelineManager.hpp:38,
                 from /usr/include/pdal/Kernel.hpp:44,
                 from /usr/include/pdal/PluginHelper.hpp:43,
                 from /usr/include/pdal/Stage.hpp:45,
                 from /usr/include/pdal/StageFactory.hpp:38,
                 from ../bu/Processor.cpp:19:
/usr/include/pdal/PointView.hpp:61:7: note: forward declaration of ‘class pdal::PointViewIter’
   61 | class PointViewIter;
      |       ^~~~~~~~~~~~~

Then after adding #include <pdal/PointViewIter.hpp> to Processor.cpp I get another error:

../bu/Processor.cpp: In member function ‘void untwine::bu::Processor::flushCompressed(pdal::PointTableRef, pdal::PointViewPtr, const untwine::bu::OctantInfo&, untwine::IndexedStats&)’:
../bu/Processor.cpp:380:28: error: conversion from ‘pdal::PointIdxRef’ to non-scalar type ‘pdal::PointRef’ requested
  380 |         for (PointRef p : *view)
      |                            ^~~~

Which I am not sure how to fix - there seems to be a change in API - PDAL 2.2 returns PointRef from the iterator, while PDAL 2.0 returns PointIdxRef.

Copy link
Contributor

@wonder-sk wonder-sk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - please feel free to merge.

@abellgithub abellgithub merged commit 7f4f6c9 into main Jan 4, 2021
@abellgithub abellgithub deleted the issue-34 branch January 4, 2021 16:28
@hobuinc hobuinc deleted a comment from nirvn Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants