Skip to content

Commit

Permalink
add sample size option
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Mar 13, 2012
1 parent 421ba1f commit 46ce0fa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/pcinfo.cpp
Expand Up @@ -75,6 +75,8 @@ class PcInfo : public Application
boost::uint64_t m_pointNumber;
std::ostream* m_outputStream;
boost::uint32_t m_seed;
boost::uint32_t m_sample_size;

};


Expand Down Expand Up @@ -124,6 +126,7 @@ void PcInfo::addSwitches()
("schema,s", po::value<bool>(&m_showSchema)->zero_tokens()->implicit_value(true), "dump the schema")
("stage,r", po::value<bool>(&m_showStage)->zero_tokens()->implicit_value(true), "dump the stage info")
("seed", po::value<boost::uint32_t>(&m_seed)->default_value(0), "Seed value for random sample")
("sample_size", po::value<boost::uint32_t>(&m_sample_size)->default_value(1000), "Sample size for random sample")
;

addSwitchSet(processing_options);
Expand Down Expand Up @@ -238,7 +241,11 @@ int PcInfo::execute()
{
Option seed_option("seed", m_seed, "seed value");
m_options.add(seed_option);
}
}

Option sample_size("sample_size", m_sample_size, "sample size for random sample");
m_options.add(sample_size);

pdal::Options options = m_options + readerOptions;

pdal::filters::Stats* filter = new pdal::filters::Stats(*reader, options);
Expand Down

0 comments on commit 46ce0fa

Please sign in to comment.