[Liblas-commits] hg: Use the m_zipPoint's LASzip instead of one on
the reader
liblas-commits at liblas.org
liblas-commits at liblas.org
Mon Jun 27 15:59:03 EDT 2011
details: http://hg.liblas.orghg/rev/b76368277444
changeset: 3025:b76368277444
user: Howard Butler <hobu.inc at gmail.com>
date: Mon Jun 27 14:58:36 2011 -0500
description:
Use the m_zipPoint's LASzip instead of one on the reader
Subject: hg: merge
details: http://hg.liblas.orghg/rev/311ca9ff9d99
changeset: 3026:311ca9ff9d99
user: Howard Butler <hobu.inc at gmail.com>
date: Mon Jun 27 14:58:58 2011 -0500
description:
merge
diffstat:
include/liblas/detail/reader/zipreader.hpp | 2 +-
mpg-config.bat | 2 +-
src/detail/reader/zipreader.cpp | 18 ++++++------------
3 files changed, 8 insertions(+), 14 deletions(-)
diffs (83 lines):
diff -r a95fbeb13499 -r 311ca9ff9d99 include/liblas/detail/reader/zipreader.hpp
--- a/include/liblas/detail/reader/zipreader.hpp Mon Jun 27 12:19:12 2011 -0700
+++ b/include/liblas/detail/reader/zipreader.hpp Mon Jun 27 14:58:58 2011 -0500
@@ -112,7 +112,7 @@
private:
void ReadIdiom();
- boost::scoped_ptr<LASzip> m_zip;
+ // boost::scoped_ptr<LASzip> m_zip;
boost::scoped_ptr<ZipPoint> m_zipPoint;
boost::scoped_ptr<LASunzipper> m_unzipper;
diff -r a95fbeb13499 -r 311ca9ff9d99 mpg-config.bat
--- a/mpg-config.bat Mon Jun 27 12:19:12 2011 -0700
+++ b/mpg-config.bat Mon Jun 27 14:58:58 2011 -0500
@@ -12,7 +12,7 @@
set LIBLAS=%DEV_DIR%\liblas
set LASZIP=%DEV_DIR%\laszip
-set BOOST=%UTILS_DIR%\boost_1_46_1
+set BOOST=%UTILS_DIR%\boost_pro_1_46_1
cmake -G %COMPILER% ^
-DBOOST_INCLUDEDIR=%BOOST% ^
diff -r a95fbeb13499 -r 311ca9ff9d99 src/detail/reader/zipreader.cpp
--- a/src/detail/reader/zipreader.cpp Mon Jun 27 12:19:12 2011 -0700
+++ b/src/detail/reader/zipreader.cpp Mon Jun 27 14:58:58 2011 -0500
@@ -85,7 +85,6 @@
}
m_zipPoint.reset();
- m_zip.reset();
m_unzipper.reset();
return;
@@ -103,33 +102,28 @@
// If we reset the reader, we're ready to start reading points, so
// we'll create a point reader at this point.
- if (!m_zip)
+ if (!m_zipPoint)
{
- // Initialize a scoped_ptr and swap it with our member variable
- // that will contain it.
- boost::scoped_ptr<LASzip> s(new LASzip());
- m_zip.swap(s);
-
PointFormatName format = m_header->GetDataFormatId();
boost::scoped_ptr<ZipPoint> z(new ZipPoint(format, m_header->GetVLRs()));
m_zipPoint.swap(z);
bool ok = false;
- ok = m_zip->setup((unsigned char)format, m_header->GetDataRecordLength());
+ ok = m_zipPoint->GetZipper()->setup((unsigned char)format, m_header->GetDataRecordLength());
if (!ok)
{
std::ostringstream oss;
- oss << "Error setting up compression engine: " << std::string(m_zip->get_error());
+ oss << "Error setting up compression engine: " << std::string(m_zipPoint->GetZipper()->get_error());
throw liblas_error(oss.str());
}
- ok = m_zip->unpack(m_zipPoint->our_vlr_data.get(), m_zipPoint->our_vlr_num);
+ ok = m_zipPoint->GetZipper()->unpack(m_zipPoint->our_vlr_data.get(), m_zipPoint->our_vlr_num);
if (!ok)
{
std::ostringstream oss;
- oss << "Error unpacking zip VLR data: " << std::string(m_zip->get_error());
+ oss << "Error unpacking zip VLR data: " << std::string(m_zipPoint->GetZipper()->get_error());
throw liblas_error(oss.str());
}
}
@@ -141,7 +135,7 @@
bool stat(false);
m_ifs.seekg(m_header->GetDataOffset(), std::ios::beg);
- stat = m_unzipper->open(m_ifs, m_zip.get());
+ stat = m_unzipper->open(m_ifs, m_zipPoint->GetZipper());
if (!stat)
{
More information about the Liblas-commits
mailing list