Skip to content

Commit

Permalink
add filename to 'pdal info' output
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Feb 5, 2015
1 parent da77403 commit a3c943b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions kernels/info/InfoKernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,11 @@ MetadataNode InfoKernel::dumpSummary(const QuickInfo& qi)
}


void InfoKernel::dump(std::ostream& o)
void InfoKernel::dump(std::ostream& o, const std::string& filename)
{
MetadataNode root;
root.add("filename", filename);

bool bPrepared(false);
if (m_showSummary || m_showAll)
{
Expand All @@ -259,7 +261,7 @@ void InfoKernel::dump(std::ostream& o)
}
if (!bPrepared)
m_manager->prepare();
//

m_manager->execute();
if (m_showStats || m_showAll)
{
Expand Down Expand Up @@ -366,7 +368,7 @@ int InfoKernel::execute()
stage = m_hexbinStage;
}

dump(std::cout);
dump(std::cout, filename);

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion kernels/info/InfoKernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class PDAL_DLL InfoKernel : public Kernel
void addSwitches(); // overrride
void validateSwitches(); // overrride

void dump(std::ostream& o);
void dump(std::ostream& o, const std::string& filename);

MetadataNode dumpPoints(PointBufferPtr buf) const;
MetadataNode dumpStats() const;
Expand Down

0 comments on commit a3c943b

Please sign in to comment.