[Liblas-commits] libpc: add seekToPoint to reset reader

liblas-commits at liblas.org liblas-commits at liblas.org
Fri Mar 11 16:10:51 EST 2011


details:   http://hg.liblas.orglibpc/rev/39b2c5e5f985
changeset: 214:39b2c5e5f985
user:      Howard Butler <hobu.inc at gmail.com>
date:      Fri Mar 11 15:10:46 2011 -0600
description:
add seekToPoint to reset reader

diffstat:

 apps/pc2pc.cpp             |  2 +-
 src/drivers/oci/writer.cpp |  4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diffs (40 lines):

diff -r c9d6c4e418fc -r 39b2c5e5f985 apps/pc2pc.cpp
--- a/apps/pc2pc.cpp	Fri Mar 11 12:10:33 2011 -0800
+++ b/apps/pc2pc.cpp	Fri Mar 11 15:10:46 2011 -0600
@@ -127,7 +127,7 @@
     else if (hasOption("oracle"))
     {
 #ifdef HAVE_ORACLE
-        LasReader reader(*ifs);
+        LiblasReader reader(*ifs);
     
         const boost::uint64_t numPoints = reader.getHeader().getNumPoints();
         
diff -r c9d6c4e418fc -r 39b2c5e5f985 src/drivers/oci/writer.cpp
--- a/src/drivers/oci/writer.cpp	Fri Mar 11 12:10:33 2011 -0800
+++ b/src/drivers/oci/writer.cpp	Fri Mar 11 15:10:46 2011 -0600
@@ -674,6 +674,7 @@
     if (!BlockTableExists())
         CreateBlockTable();
     
+    m_stage.seekToPoint(0);
     return;
 }
 
@@ -687,6 +688,7 @@
 
 boost::uint32_t Writer::writeBuffer(const PointData& pointData)
 {
+    boost::uint32_t numPoints = pointData.getNumPoints();
     // bool hasTimeData = false;
     // bool hasColorData = false;
     // bool hasWaveData = false;
@@ -809,7 +811,7 @@
     // }
     // 
     // return numPoints;
-    return 0;
+    return numPoints;
 }
 
 void Writer::Debug()


More information about the Liblas-commits mailing list