[Liblas-commits] hg-main-tree: allow reader to be init'd early, so can snark its SRS

liblas-commits at liblas.org liblas-commits at liblas.org
Mon Aug 1 19:55:03 EDT 2011


details:   http://hg.libpc.orghg-main-tree/rev/0893210f7f19
changeset: 976:0893210f7f19
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Mon Aug 01 16:54:55 2011 -0700
description:
allow reader to be init'd early, so can snark its SRS

diffstat:

 apps/pc2pc.cpp    |  3 +++
 apps/pcinfo.cpp   |  2 +-
 src/StageBase.cpp |  8 ++++----
 3 files changed, 8 insertions(+), 5 deletions(-)

diffs (50 lines):

diff -r 7706439c9431 -r 0893210f7f19 apps/pc2pc.cpp
--- a/apps/pc2pc.cpp	Mon Aug 01 16:49:15 2011 -0700
+++ b/apps/pc2pc.cpp	Mon Aug 01 16:54:55 2011 -0700
@@ -142,6 +142,7 @@
 #ifdef PDAL_HAVE_ORACLE
         try{
         pdal::drivers::las::LasReader reader(m_inputFile);
+        reader.initialize();
     
         const boost::uint64_t numPoints = reader.getNumPoints();
 
@@ -232,6 +233,8 @@
 
 
         pdal::drivers::oci::Reader reader(options);
+        reader.initialize();
+
         pdal::drivers::las::LasWriter* writer;
 
         pdal::SpatialReference out_ref(out_wkt);
diff -r 7706439c9431 -r 0893210f7f19 apps/pcinfo.cpp
--- a/apps/pcinfo.cpp	Mon Aug 01 16:49:15 2011 -0700
+++ b/apps/pcinfo.cpp	Mon Aug 01 16:54:55 2011 -0700
@@ -111,7 +111,7 @@
         return 1;
     }
 
-    reader.initialize();
+    reader->initialize();
 
     const boost::uint64_t numPoints = reader->getNumPoints();
     const SpatialReference& srs = reader->getSpatialReference();
diff -r 7706439c9431 -r 0893210f7f19 src/StageBase.cpp
--- a/src/StageBase.cpp	Mon Aug 01 16:49:15 2011 -0700
+++ b/src/StageBase.cpp	Mon Aug 01 16:54:55 2011 -0700
@@ -63,10 +63,10 @@
 {
     // it is legal now to call initialize() twice (but you really shouldn't)
     //
-    if (m_initialized)
-    {
-        throw pdal_error("Class already initialized: " + this->getName());
-    }
+    //if (m_initialized)
+    //{
+    //    throw pdal_error("Class already initialized: " + this->getName());
+    //}
 
     m_debug = m_options.getValueOrDefault<bool>("debug", false);
     m_verbose = m_options.getValueOrDefault<boost::uint8_t>("verbose", 0);


More information about the Liblas-commits mailing list