[Liblas-commits] libpc: GpsTime --> Time

liblas-commits at liblas.org liblas-commits at liblas.org
Fri Mar 11 18:36:13 EST 2011


details:   http://hg.liblas.orglibpc/rev/734f4bc84222
changeset: 219:734f4bc84222
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Fri Mar 11 15:36:08 2011 -0800
description:
GpsTime --> Time

diffstat:

 include/libpc/Dimension.hpp        |  2 +-
 src/Dimension.cpp                  |  2 +-
 src/FauxReader.cpp                 |  4 ++--
 src/LasHeader.cpp                  |  2 +-
 src/LasReader.cpp                  |  6 +++---
 src/LasWriter.cpp                  |  6 +++---
 src/drivers/liblas/reader.cpp      |  8 ++++----
 src/drivers/liblas/writer.cpp      |  6 +++---
 test/unit/CacheFilterTest.cpp      |  2 +-
 test/unit/DecimationFilterTest.cpp |  2 +-
 test/unit/FauxReaderTest.cpp       |  4 ++--
 test/unit/MosaicFilterTest.cpp     |  2 +-
 12 files changed, 23 insertions(+), 23 deletions(-)

diffs (230 lines):

diff -r f338384ff966 -r 734f4bc84222 include/libpc/Dimension.hpp
--- a/include/libpc/Dimension.hpp	Fri Mar 11 15:31:26 2011 -0800
+++ b/include/libpc/Dimension.hpp	Fri Mar 11 15:36:08 2011 -0800
@@ -79,7 +79,7 @@
         Field_ScanAngleRank,
         Field_UserData,
         Field_PointSourceId,
-        Field_GpsTime,
+        Field_Time,
         Field_Red,
         Field_Green,
         Field_Blue,
diff -r f338384ff966 -r 734f4bc84222 src/Dimension.cpp
--- a/src/Dimension.cpp	Fri Mar 11 15:31:26 2011 -0800
+++ b/src/Dimension.cpp	Fri Mar 11 15:36:08 2011 -0800
@@ -361,7 +361,7 @@
     s_fieldNames[Field_ScanAngleRank] = "ScanAngleRank";
     s_fieldNames[Field_UserData] = "UserData";
     s_fieldNames[Field_PointSourceId] = "PointSourceId";
-    s_fieldNames[Field_GpsTime] = "GpsTime";
+    s_fieldNames[Field_Time] = "Time";
     s_fieldNames[Field_Red] = "Red";
     s_fieldNames[Field_Green] = "Green";
     s_fieldNames[Field_Blue] = "Blue";
diff -r f338384ff966 -r 734f4bc84222 src/FauxReader.cpp
--- a/src/FauxReader.cpp	Fri Mar 11 15:31:26 2011 -0800
+++ b/src/FauxReader.cpp	Fri Mar 11 15:36:08 2011 -0800
@@ -56,7 +56,7 @@
     schema.addDimension(Dimension(Dimension::Field_X, Dimension::Float));
     schema.addDimension(Dimension(Dimension::Field_Y, Dimension::Float));
     schema.addDimension(Dimension(Dimension::Field_Z, Dimension::Float));
-    schema.addDimension(Dimension(Dimension::Field_GpsTime, Dimension::Uint64));
+    schema.addDimension(Dimension(Dimension::Field_Time, Dimension::Uint64));
 
     header->setNumPoints(numPoints);
     header->setBounds(bounds);
@@ -118,7 +118,7 @@
     const double minZ = dims[2].getMinimum();
     const double maxZ = dims[2].getMaximum();
 
-    const int offsetT = schema.getDimensionIndex(Dimension::Field_GpsTime);
+    const int offsetT = schema.getDimensionIndex(Dimension::Field_Time);
     const int offsetX = schema.getDimensionIndex(Dimension::Field_X);
     const int offsetY = schema.getDimensionIndex(Dimension::Field_Y);
     const int offsetZ = schema.getDimensionIndex(Dimension::Field_Z);
diff -r f338384ff966 -r 734f4bc84222 src/LasHeader.cpp
--- a/src/LasHeader.cpp	Fri Mar 11 15:31:26 2011 -0800
+++ b/src/LasHeader.cpp	Fri Mar 11 15:36:08 2011 -0800
@@ -866,7 +866,7 @@
 {
     std::ostringstream text;
 
-    Dimension t(Dimension::Field_GpsTime, Dimension::Uint64);
+    Dimension t(Dimension::Field_Time, Dimension::Uint64);
     text << "The GPS Time is the double floating point time tag value at "
          "which the point was acquired. It is GPS Week Time if the "
          "Global Encoding low bit is clear and Adjusted Standard GPS "
diff -r f338384ff966 -r 734f4bc84222 src/LasReader.cpp
--- a/src/LasReader.cpp	Fri Mar 11 15:31:26 2011 -0800
+++ b/src/LasReader.cpp	Fri Mar 11 15:36:08 2011 -0800
@@ -141,7 +141,7 @@
     const int fieldIndexUserData = schema.getDimensionIndex(Dimension::Field_UserData);
     const int fieldIndexPointSource = schema.getDimensionIndex(Dimension::Field_PointSourceId);
 
-    const int fieldIndexTime = (hasTimeData ? schema.getDimensionIndex(Dimension::Field_GpsTime) : 0);
+    const int fieldIndexTime = (hasTimeData ? schema.getDimensionIndex(Dimension::Field_Time) : 0);
 
     const int fieldIndexRed = (hasColorData ? schema.getDimensionIndex(Dimension::Field_Red) : 0);
     const int fieldIndexGreen = (hasColorData ? schema.getDimensionIndex(Dimension::Field_Green) : 0);
@@ -212,7 +212,7 @@
             const boost::int8_t scanAngleRank = Utils::read_field<boost::int8_t>(p);
             const boost::uint8_t user = Utils::read_field<boost::uint8_t>(p);
             const boost::uint16_t pointSourceId = Utils::read_field<boost::uint16_t>(p);
-            const double gpsTime = Utils::read_field<double>(p);
+            const double time = Utils::read_field<double>(p);
             const boost::uint16_t red = Utils::read_field<boost::uint16_t>(p);
             const boost::uint16_t green = Utils::read_field<boost::uint16_t>(p);
             const boost::uint16_t blue = Utils::read_field<boost::uint16_t>(p);
@@ -234,7 +234,7 @@
             pointData.setField<boost::int8_t>(pointIndex, fieldIndexScanAngle, scanAngleRank);
             pointData.setField<boost::uint8_t>(pointIndex, fieldIndexUserData, user);
             pointData.setField<boost::uint16_t>(pointIndex, fieldIndexPointSource, pointSourceId);
-            pointData.setField<double>(pointIndex, fieldIndexTime, gpsTime);
+            pointData.setField<double>(pointIndex, fieldIndexTime, time);
             pointData.setField<boost::uint16_t>(pointIndex, fieldIndexRed, red);
             pointData.setField<boost::uint16_t>(pointIndex, fieldIndexGreen, green);
             pointData.setField<boost::uint16_t>(pointIndex, fieldIndexBlue, blue);
diff -r f338384ff966 -r 734f4bc84222 src/LasWriter.cpp
--- a/src/LasWriter.cpp	Fri Mar 11 15:31:26 2011 -0800
+++ b/src/LasWriter.cpp	Fri Mar 11 15:36:08 2011 -0800
@@ -139,7 +139,7 @@
     const int fieldIndexUserData = schema.getDimensionIndex(Dimension::Field_UserData);
     const int fieldIndexPointSource = schema.getDimensionIndex(Dimension::Field_PointSourceId);
     
-    const int fieldIndexTime = (hasTimeData ? schema.getDimensionIndex(Dimension::Field_GpsTime) : 0);
+    const int fieldIndexTime = (hasTimeData ? schema.getDimensionIndex(Dimension::Field_Time) : 0);
     
     const int fieldIndexRed = (hasColorData ? schema.getDimensionIndex(Dimension::Field_Red) : 0);
     const int fieldIndexGreen = (hasColorData ? schema.getDimensionIndex(Dimension::Field_Green) : 0);
@@ -216,7 +216,7 @@
             const boost::int8_t scanAngleRank = pointData.getField<boost::int8_t>(pointIndex, fieldIndexScanAngle);
             const boost::uint8_t user = pointData.getField<boost::uint8_t>(pointIndex, fieldIndexUserData);
             const boost::uint16_t pointSourceId = pointData.getField<boost::uint16_t>(pointIndex, fieldIndexPointSource);
-            const double gpsTime = pointData.getField<double>(pointIndex, fieldIndexTime);
+            const double time = pointData.getField<double>(pointIndex, fieldIndexTime);
             const boost::uint16_t red = pointData.getField<boost::uint16_t>(pointIndex, fieldIndexRed);
             const boost::uint16_t green = pointData.getField<boost::uint16_t>(pointIndex, fieldIndexGreen);
             const boost::uint16_t blue = pointData.getField<boost::uint16_t>(pointIndex, fieldIndexBlue);
@@ -230,7 +230,7 @@
             Utils::write_field<boost::int8_t>(p, scanAngleRank);
             Utils::write_field<boost::uint8_t>(p, user);
             Utils::write_field<boost::uint16_t>(p, pointSourceId);
-            Utils::write_field<double>(p, gpsTime);
+            Utils::write_field<double>(p, time);
             Utils::write_field<boost::uint16_t>(p, red);
             Utils::write_field<boost::uint16_t>(p, green);
             Utils::write_field<boost::uint16_t>(p, blue);
diff -r f338384ff966 -r 734f4bc84222 src/drivers/liblas/reader.cpp
--- a/src/drivers/liblas/reader.cpp	Fri Mar 11 15:31:26 2011 -0800
+++ b/src/drivers/liblas/reader.cpp	Fri Mar 11 15:36:08 2011 -0800
@@ -188,7 +188,7 @@
 
     if (m_hasTimeData)
     {
-        schema.addDimension(Dimension(Dimension::Field_GpsTime, Dimension::Double));
+        schema.addDimension(Dimension(Dimension::Field_Time, Dimension::Double));
     }
 
     if (m_hasColorData)
@@ -254,7 +254,7 @@
     const int indexUserData = schema.getDimensionIndex(Dimension::Field_UserData);
     const int indexPointSourceId = schema.getDimensionIndex(Dimension::Field_PointSourceId);
     
-    const int indexGpsTime = (m_hasTimeData ? schema.getDimensionIndex(Dimension::Field_GpsTime) : 0);
+    const int indexTime = (m_hasTimeData ? schema.getDimensionIndex(Dimension::Field_Time) : 0);
 
     const int indexRed = (m_hasColorData ? schema.getDimensionIndex(Dimension::Field_Red) : 0);
     const int indexGreen = (m_hasColorData ? schema.getDimensionIndex(Dimension::Field_Green) : 0);
@@ -307,9 +307,9 @@
 
         if (m_hasTimeData)
         {
-            const double gpsTime = pt.GetTime();
+            const double time = pt.GetTime();
             
-            pointData.setField(i, indexGpsTime, gpsTime);
+            pointData.setField(i, indexTime, time);
         }
 
         if (m_hasColorData)
diff -r f338384ff966 -r 734f4bc84222 src/drivers/liblas/writer.cpp
--- a/src/drivers/liblas/writer.cpp	Fri Mar 11 15:31:26 2011 -0800
+++ b/src/drivers/liblas/writer.cpp	Fri Mar 11 15:36:08 2011 -0800
@@ -216,7 +216,7 @@
     const int indexUserData = schema.getDimensionIndex(Dimension::Field_UserData);
     const int indexPointSourceId = schema.getDimensionIndex(Dimension::Field_PointSourceId);
     
-    const int indexGpsTime = (hasTimeData ? schema.getDimensionIndex(Dimension::Field_GpsTime) : 0);
+    const int indexTime = (hasTimeData ? schema.getDimensionIndex(Dimension::Field_Time) : 0);
 
     const int indexRed = (hasColorData ? schema.getDimensionIndex(Dimension::Field_Red) : 0);
     const int indexGreen = (hasColorData ? schema.getDimensionIndex(Dimension::Field_Green) : 0);
@@ -262,8 +262,8 @@
 
         if (hasTimeData)
         {
-            const double gpsTime = pointData.getField<double>(i, indexGpsTime);
-            pt.SetTime(gpsTime);
+            const double time = pointData.getField<double>(i, indexTime);
+            pt.SetTime(time);
         }
 
         if (hasColorData)
diff -r f338384ff966 -r 734f4bc84222 test/unit/CacheFilterTest.cpp
--- a/test/unit/CacheFilterTest.cpp	Fri Mar 11 15:31:26 2011 -0800
+++ b/test/unit/CacheFilterTest.cpp	Fri Mar 11 15:36:08 2011 -0800
@@ -52,7 +52,7 @@
 
     const Schema& schema = reader.getHeader().getSchema();
     SchemaLayout layout(schema);
-    const int offsetT = schema.getDimensionIndex(Dimension::Field_GpsTime);
+    const int offsetT = schema.getDimensionIndex(Dimension::Field_Time);
 
     PointData dataBig(layout, 1024);
     PointData dataSmall(layout, 1);
diff -r f338384ff966 -r 734f4bc84222 test/unit/DecimationFilterTest.cpp
--- a/test/unit/DecimationFilterTest.cpp	Fri Mar 11 15:31:26 2011 -0800
+++ b/test/unit/DecimationFilterTest.cpp	Fri Mar 11 15:36:08 2011 -0800
@@ -61,7 +61,7 @@
 
     BOOST_CHECK(numRead == 3);
 
-    int offsetT = schema.getDimensionIndex(Dimension::Field_GpsTime);
+    int offsetT = schema.getDimensionIndex(Dimension::Field_Time);
 
     boost::uint64_t t0 = data.getField<boost::uint64_t>(0, offsetT);
     boost::uint64_t t1 = data.getField<boost::uint64_t>(1, offsetT);
diff -r f338384ff966 -r 734f4bc84222 test/unit/FauxReaderTest.cpp
--- a/test/unit/FauxReaderTest.cpp	Fri Mar 11 15:31:26 2011 -0800
+++ b/test/unit/FauxReaderTest.cpp	Fri Mar 11 15:36:08 2011 -0800
@@ -59,7 +59,7 @@
     int offsetX = schema.getDimensionIndex(Dimension::Field_X);
     int offsetY = schema.getDimensionIndex(Dimension::Field_Y);
     int offsetZ = schema.getDimensionIndex(Dimension::Field_Z);
-    int offsetT = schema.getDimensionIndex(Dimension::Field_GpsTime);
+    int offsetT = schema.getDimensionIndex(Dimension::Field_Time);
 
     for (boost::uint32_t i=0; i<numRead; i++)
     {
@@ -95,7 +95,7 @@
     int offsetX = schema.getDimensionIndex(Dimension::Field_X);
     int offsetY = schema.getDimensionIndex(Dimension::Field_Y);
     int offsetZ = schema.getDimensionIndex(Dimension::Field_Z);
-    int offsetT = schema.getDimensionIndex(Dimension::Field_GpsTime);
+    int offsetT = schema.getDimensionIndex(Dimension::Field_Time);
 
     for (boost::uint32_t i=0; i<numRead; i++)
     {
diff -r f338384ff966 -r 734f4bc84222 test/unit/MosaicFilterTest.cpp
--- a/test/unit/MosaicFilterTest.cpp	Fri Mar 11 15:31:26 2011 -0800
+++ b/test/unit/MosaicFilterTest.cpp	Fri Mar 11 15:36:08 2011 -0800
@@ -69,7 +69,7 @@
 
     BOOST_CHECK(numRead == 300);
 
-    const int offsetT = schema.getDimensionIndex(Dimension::Field_GpsTime);
+    const int offsetT = schema.getDimensionIndex(Dimension::Field_Time);
     const int offsetX = schema.getDimensionIndex(Dimension::Field_X);
     const int offsetY = schema.getDimensionIndex(Dimension::Field_Y);
     const int offsetZ = schema.getDimensionIndex(Dimension::Field_Z);


More information about the Liblas-commits mailing list