[Liblas-commits] hg: allow the setting of the index capacity

liblas-commits at liblas.org liblas-commits at liblas.org
Fri Oct 23 17:01:34 EDT 2009


changeset e06f2ddbbb43 in /home/www/liblas.org/hg
details: http://hg.liblas.org/main/hg?cmd=changeset;node=e06f2ddbbb43
summary: allow the setting of the index capacity

diffstat:

 apps/lasindex.cpp |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (35 lines):

diff -r 143e29a52de4 -r e06f2ddbbb43 apps/lasindex.cpp
--- a/apps/lasindex.cpp	Fri Oct 23 14:41:00 2009 -0500
+++ b/apps/lasindex.cpp	Fri Oct 23 15:58:31 2009 -0500
@@ -54,6 +54,7 @@
     std::string input;
     
     long dimension = 3;
+    long capacity = 10000;
     
     for (int i = 1; i < argc; i++)
     {
@@ -81,6 +82,14 @@
             i++;
             dimension = atoi(argv[i]);
         }
+        else if (   std::strcmp(argv[i],"--capacity") == 0  ||
+                    std::strcmp(argv[i],"-cap") == 0     ||
+                    std::strcmp(argv[i],"-c") == 0       
+                )
+        {
+            i++;
+            capacity = atoi(argv[i]);
+        }
         else if (input.empty())
         {
             input = std::string(argv[i]);
@@ -108,7 +117,7 @@
     
     LASIndex* idx = new LASIndex(input);
     idx->SetType(LASIndex::eExternalIndex);
-    idx->SetLeafCapacity(10000);
+    idx->SetLeafCapacity(capacity);
     idx->SetFillFactor(0.8);
     idx->SetDimension(dimension);
     idx->Initialize(*idxstrm);


More information about the Liblas-commits mailing list