Skip to content

Commit

Permalink
Remove patch count from metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Ramsey committed May 13, 2013
1 parent 72af621 commit 98194a4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
2 changes: 0 additions & 2 deletions include/pdal/drivers/pgpointcloud/Reader.hpp
Expand Up @@ -72,7 +72,6 @@ class PDAL_DLL Reader : public pdal::Reader
}

virtual boost::uint64_t getNumPoints() const;
boost::uint64_t getNumPatches() const;
boost::uint64_t getMaxPoints() const;
std::string getDataQuery() const;
void getSession() const;
Expand All @@ -97,7 +96,6 @@ class PDAL_DLL Reader : public pdal::Reader
std::string m_where;
mutable boost::uint32_t m_pcid;
mutable boost::uint64_t m_cached_point_count;
mutable boost::uint64_t m_cached_patch_count;
mutable boost::uint64_t m_cached_max_points;

}; // pdal.drivers.pgpointcloud.Reader
Expand Down
13 changes: 1 addition & 12 deletions src/drivers/pgpointcloud/Reader.cpp
Expand Up @@ -90,7 +90,6 @@ Reader::Reader(const Options& options)
, m_where("")
, m_pcid(0)
, m_cached_point_count(0)
, m_cached_patch_count(0)
, m_cached_max_points(0)
{}

Expand Down Expand Up @@ -167,7 +166,6 @@ boost::uint64_t Reader::getNumPoints() const
{
std::ostringstream oss;
oss << "SELECT Sum(PC_NumPoints(" << m_column_name << ")) AS numpoints, ";
oss << "Count(*) AS numpatches, ";
oss << "Max(PC_NumPoints(" << m_column_name << ")) AS maxpoints FROM ";
if ( m_schema_name.size() )
{
Expand All @@ -179,7 +177,7 @@ boost::uint64_t Reader::getNumPoints() const
oss << " WHERE " << m_where;
}

m_session->once << oss.str(), ::soci::into(m_cached_point_count), ::soci::into(m_cached_patch_count), ::soci::into(m_cached_max_points);
m_session->once << oss.str(), ::soci::into(m_cached_point_count), ::soci::into(m_cached_max_points);
oss.str("");
}

Expand All @@ -205,15 +203,6 @@ std::string Reader::getDataQuery() const
return oss.str();
}

boost::uint64_t Reader::getNumPatches() const
{
if ( m_cached_point_count == 0 )
{
boost::uint64_t npoints = getNumPoints();
}
return m_cached_patch_count;
}

boost::uint64_t Reader::getMaxPoints() const
{
if ( m_cached_point_count == 0 )
Expand Down

0 comments on commit 98194a4

Please sign in to comment.