[Liblas-commits] hg: fix up index creation

liblas-commits at liblas.org liblas-commits at liblas.org
Tue Oct 13 16:20:43 EDT 2009


changeset 5d1ceaf7f036 in /home/www/liblas.org/hg
details: http://hg.liblas.org/main/hg?cmd=changeset;node=5d1ceaf7f036
summary: fix up index creation

diffstat:

 apps/las2oci.cpp |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r 76664fc4c414 -r 5d1ceaf7f036 apps/las2oci.cpp
--- a/apps/las2oci.cpp	Tue Oct 13 14:53:04 2009 -0500
+++ b/apps/las2oci.cpp	Tue Oct 13 15:18:05 2009 -0500
@@ -565,7 +565,8 @@
     std::string point_cloud_name("CLOUD");
     std::string base_table_name("HOBU");
     std::string block_table_name("");
-        
+    
+    bool bUseExistingBlockTable = false;
     bool bDropTable = false;
     liblas::uint32_t nCapacity = 10000;
     double dFillFactor = 0.99;
@@ -722,9 +723,12 @@
     
     if (!BlockTableExists(con, table_name.c_str()))
         CreateBlockTable(con, table_name.c_str());
-    else
+    else {
+        bUseExistingBlockTable = true;
         std::cout << "Using existing block table ... " << std::endl;
 
+    }
+
     LASReader* reader = new LASReader(*istrm);
     LASIndexDataStream* idxstrm = new LASIndexDataStream(reader);
     // reader->Reset();
@@ -754,7 +758,7 @@
         bool inserted = InsertBlock(con, *i, srid, reader2, table_name.c_str());
     }
     
-    if (!BlockTableExists(con, table_name.c_str())) {
+    if (!bUseExistingBlockTable) {
         CreateSDOEntry(con, table_name.c_str(), query, srid );
         CreateBlockIndex(con, table_name.c_str());
     }


More information about the Liblas-commits mailing list