[Liblas-commits] libpc: fixups to bring things in line with mpg's latest changes

liblas-commits at liblas.org liblas-commits at liblas.org
Sat Mar 12 09:09:25 EST 2011


details:   http://hg.liblas.orglibpc/rev/cad506ee8458
changeset: 222:cad506ee8458
user:      Howard Butler <hobu.inc at gmail.com>
date:      Sat Mar 12 08:09:18 2011 -0600
description:
fixups to bring things in line with mpg's latest changes

diffstat:

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

diffs (46 lines):

diff -r 33cd2850cafa -r cad506ee8458 apps/pc2pc.cpp
--- a/apps/pc2pc.cpp	Fri Mar 11 17:18:10 2011 -0800
+++ b/apps/pc2pc.cpp	Sat Mar 12 08:09:18 2011 -0600
@@ -139,7 +139,7 @@
         tree.put("debug", true);
         tree.put("verbose", true);
         
-        CacheFilter cache(reader);
+        CacheFilter cache(reader, 1, 1024);
         
         libpc::driver::oci::Writer writer(cache, options);
         
diff -r 33cd2850cafa -r cad506ee8458 src/drivers/oci/writer.cpp
--- a/src/drivers/oci/writer.cpp	Fri Mar 11 17:18:10 2011 -0800
+++ b/src/drivers/oci/writer.cpp	Sat Mar 12 08:09:18 2011 -0600
@@ -691,7 +691,7 @@
 
     libpc::Schema const& schema = buffer.getSchema();
 
-    bool hasTimeData = schema.hasDimension(Dimension::Field_GpsTime);
+    bool hasTimeData = schema.hasDimension(Dimension::Field_Time);
     
     boost::uint64_t count = buffer.getNumPoints();
 
@@ -699,7 +699,7 @@
     const int indexY = schema.getDimensionIndex(Dimension::Field_Y);
     const int indexZ = schema.getDimensionIndex(Dimension::Field_Z);
     const int indexClassification = schema.getDimensionIndex(Dimension::Field_Classification);
-    const int indexTime = schema.getDimensionIndex(Dimension::Field_GpsTime);
+    const int indexTime = schema.getDimensionIndex(Dimension::Field_Time);
     
     Dimension const& dimX = schema.getDimension(indexX);
     Dimension const& dimY = schema.getDimension(indexY);
@@ -722,9 +722,10 @@
         const double z = (buffer.getField<boost::int32_t>(counter, indexZ) * zscale) + zoffset;
         
         double t = 0.0;
-        if (hasTimeData)
+        if (indexTime != -1)
             t = buffer.getField<double>(counter, indexTime);
-            
+        
+        
         counter++;
     }
     


More information about the Liblas-commits mailing list