[Liblas-commits] hg: start of C# swig bindings project

liblas-commits at liblas.org liblas-commits at liblas.org
Wed Jan 12 11:32:07 EST 2011


details:   http://hg.liblas.orghg/rev/44f7e7f2a6f9
changeset: 2732:44f7e7f2a6f9
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Tue Jan 11 12:06:49 2011 -0800
description:
start of C# swig bindings project
Subject: hg: pull-merge

details:   http://hg.liblas.orghg/rev/40e2d3663f46
changeset: 2733:40e2d3663f46
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Tue Jan 11 12:08:33 2011 -0800
description:
pull-merge
Subject: hg: added copyrights

details:   http://hg.liblas.orghg/rev/9f869f17081a
changeset: 2734:9f869f17081a
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Tue Jan 11 12:49:28 2011 -0800
description:
added copyrights
Subject: hg: cut/paste error

details:   http://hg.liblas.orghg/rev/16c21d4ba38d
changeset: 2735:16c21d4ba38d
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Wed Jan 12 08:31:01 2011 -0800
description:
cut/paste error
Subject: hg: checkpoint

details:   http://hg.liblas.orghg/rev/8dc111adfbfa
changeset: 2736:8dc111adfbfa
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Wed Jan 12 08:31:50 2011 -0800
description:
checkpoint

diffstat:

 .hgignore                                                  |    6 +
 apps/las2oci.cpp                                           |   44 +-
 apps/las2ogr.cpp                                           |    2 +-
 apps/lasblock.cpp                                          |    2 +-
 apps/lasindex_test.cpp                                     |   60 +-
 apps/laskernel.cpp                                         |   34 +-
 csharp-new/README.txt                                      |   46 ++
 csharp-new/liblas_swig.sln                                 |   57 ++
 csharp-new/liblas_swig_cpp/liblas.i                        |  295 +++++++++++++
 csharp-new/liblas_swig_cpp/liblas_swig_cpp.vcxproj         |  183 ++++++++
 csharp-new/liblas_swig_cpp/liblas_swig_cpp.vcxproj.filters |   17 +
 csharp-new/liblas_swig_cpp/liblas_swig_cpp.vcxproj.user    |    3 +
 csharp-new/liblas_swig_cs/Properties/AssemblyInfo.cs       |   36 +
 csharp-new/liblas_swig_cs/liblas_swig_cs.csproj            |  118 +++++
 csharp-new/liblas_swig_test/Program.cs                     |  104 ++++
 csharp-new/liblas_swig_test/Properties/AssemblyInfo.cs     |   36 +
 csharp-new/liblas_swig_test/liblas_swig_test.csproj        |   98 ++++
 hobu-config.bat                                            |    4 +-
 include/liblas/bounds.hpp                                  |   26 +-
 include/liblas/classification.hpp                          |    8 +
 include/liblas/factory.hpp                                 |    2 +-
 include/liblas/index.hpp                                   |   42 +-
 include/liblas/utility.hpp                                 |    8 +-
 src/detail/index/indexoutput.cpp                           |   22 +-
 src/header.cpp                                             |   16 +-
 src/index.cpp                                              |   22 +-
 src/point.cpp                                              |    9 +-
 src/transform.cpp                                          |   24 +-
 src/utility.cpp                                            |  196 ++++----
 test/unit/common.hpp                                       |   24 +-
 30 files changed, 1279 insertions(+), 265 deletions(-)

diffs (truncated from 2331 to 300 lines):

diff -r 02902673a24d -r 8dc111adfbfa .hgignore
--- a/.hgignore	Tue Jan 11 09:26:42 2011 -0800
+++ b/.hgignore	Wed Jan 12 08:31:50 2011 -0800
@@ -107,3 +107,9 @@
 libLAS.opensdf
 libLAS.sdf
 *.tlog
+csharp-new/liblas_swig.opensdf
+csharp-new/liblas_swig.sdf
+
+# swig-generated files
+csharp-new/liblas_swig_cs/*.cs
+csharp-new/liblas_swig_cpp/liblas_wrap.cpp
diff -r 02902673a24d -r 8dc111adfbfa apps/las2oci.cpp
--- a/apps/las2oci.cpp	Tue Jan 11 09:26:42 2011 -0800
+++ b/apps/las2oci.cpp	Wed Jan 12 08:31:50 2011 -0800
@@ -78,15 +78,15 @@
                      liblas::Bounds<double> const& extent)
 {
     
-    statement->AddElement(ordinates, extent.min(0));
-    statement->AddElement(ordinates, extent.min(1));
+    statement->AddElement(ordinates, (extent.min)(0));
+    statement->AddElement(ordinates, (extent.min)(1));
     if (extent.dimension() > 2)
-        statement->AddElement(ordinates, extent.min(2));
+        statement->AddElement(ordinates, (extent.min)(2));
     
-    statement->AddElement(ordinates, extent.max(0));
-    statement->AddElement(ordinates, extent.max(1));
+    statement->AddElement(ordinates, (extent.max)(0));
+    statement->AddElement(ordinates, (extent.max)(1));
     if (extent.dimension() > 2)
-        statement->AddElement(ordinates, extent.max(2));
+        statement->AddElement(ordinates, (extent.max)(2));
         
 
 }
@@ -332,9 +332,9 @@
     liblas::Bounds<double> e = *query->bounds.get();
 
     if (IsGeographic(connection, srid)) {
-        e.min(0,-180.0); e.max(0,180.0);
-        e.min(1,-90.0); e.max(1,90.0);
-        e.min(2,0.0); e.max(2,20000.0);
+        (e.min)(0,-180.0); (e.max)(0,180.0);
+        (e.min)(1,-90.0); (e.max)(1,90.0);
+        (e.min)(2,0.0); (e.max)(2,20000.0);
 
         tolerance = 0.000000005;
     }
@@ -348,12 +348,12 @@
     oss <<  "INSERT INTO user_sdo_geom_metadata VALUES ('" << tableName <<
         "','blk_extent', MDSYS.SDO_DIM_ARRAY(";
     
-    oss << "MDSYS.SDO_DIM_ELEMENT('X', " << e.min(0) << "," << e.max(0) <<"," << tolerance << "),"
-           "MDSYS.SDO_DIM_ELEMENT('Y', " << e.min(1) << "," << e.max(1) <<"," << tolerance << ")";
+    oss << "MDSYS.SDO_DIM_ELEMENT('X', " << (e.min)(0) << "," << (e.max)(0) <<"," << tolerance << "),"
+           "MDSYS.SDO_DIM_ELEMENT('Y', " << (e.min)(1) << "," << (e.max)(1) <<"," << tolerance << ")";
            
     if (bUse3d) {
         oss << ",";
-        oss <<"MDSYS.SDO_DIM_ELEMENT('Z', "<< e.min(2) << "," << e.max(2) << "," << tolerance << ")";
+        oss <<"MDSYS.SDO_DIM_ELEMENT('Z', "<< (e.min)(2) << "," << (e.max)(2) << "," << tolerance << ")";
     }
     oss << ")," << s_srid.str() << ")";
     
@@ -467,16 +467,16 @@
 "              mdsys.sdo_elem_info_array"<< s_eleminfo.str() <<",\n"
 "              mdsys.sdo_ordinate_array(\n";
 
-    s_geom << e.min(0) << "," << e.min(1) << ",";
+    s_geom << (e.min)(0) << "," << (e.min)(1) << ",";
 
     if (bUse3d) {
-        s_geom << e.min(2) << ",";
+        s_geom << (e.min)(2) << ",";
     }
     
-    s_geom << e.max(0) << "," << e.max(1);
+    s_geom << (e.max)(0) << "," << (e.max)(1);
 
     if (bUse3d) {
-        s_geom << "," << e.max(2);
+        s_geom << "," << (e.max)(2);
     }
 
     s_geom << "))";
@@ -952,42 +952,42 @@
         if (vm.count("xmin")) 
         {
             double xmin = vm["xmin"].as< double >();
-            global_extent.min(0, xmin);
+            (global_extent.min)(0, xmin);
             if (verbose)
                 std::cout << "Setting xmin to: " << xmin << std::endl;
         }
         if (vm.count("ymin")) 
         {
             double ymin = vm["ymin"].as< double >();
-            global_extent.min(1, ymin);
+            (global_extent.min)(1, ymin);
             if (verbose)
                 std::cout << "Setting ymin to: " << ymin << std::endl;
         }
         if (vm.count("zmin")) 
         {
             double zmin = vm["zmin"].as< double >();
-            global_extent.min(2, zmin);
+            (global_extent.min)(2, zmin);
             if (verbose)
                 std::cout << "Setting zmin to: " << zmin << std::endl;
         }
         if (vm.count("xmax")) 
         {
             double xmax = vm["xmax"].as< double >();
-            global_extent.max(0, xmax);
+            (global_extent.max)(0, xmax);
             if (verbose)
                 std::cout << "Setting xmax to: " << xmax << std::endl;
         }
         if (vm.count("ymax")) 
         {
             double ymax = vm["ymax"].as< double >();
-            global_extent.max(1, ymax);
+            (global_extent.max)(1, ymax);
             if (verbose)
                 std::cout << "Setting ymax to: " << ymax << std::endl;
         }
         if (vm.count("zmax")) 
         {
             double zmax = vm["zmax"].as< double >();
-            global_extent.max(2, zmax);
+            (global_extent.max)(2, zmax);
             if (verbose)
                 std::cout << "Setting zmax to: " << zmax << std::endl;
         }
diff -r 02902673a24d -r 8dc111adfbfa apps/las2ogr.cpp
--- a/apps/las2ogr.cpp	Tue Jan 11 09:26:42 2011 -0800
+++ b/apps/las2ogr.cpp	Wed Jan 12 08:31:50 2011 -0800
@@ -94,7 +94,7 @@
     static int lastTick = -1;
     int tick = static_cast<int>(complete * 40.0);
 
-    tick = (std::min)(40, std::max(0, tick));
+    tick = (std::min)(40, (std::max)(0, tick));
 
     // Have we started a new progress run?  
     if (tick < lastTick && lastTick >= 39)
diff -r 02902673a24d -r 8dc111adfbfa apps/lasblock.cpp
--- a/apps/lasblock.cpp	Tue Jan 11 09:26:42 2011 -0800
+++ b/apps/lasblock.cpp	Wed Jan 12 08:31:50 2011 -0800
@@ -166,7 +166,7 @@
         out.setf(std::ios::fixed,std::ios::floatfield);
         out.precision(precision);
         liblas::Bounds<double> const& bnd = b.GetBounds();
-        out << bnd.min(0) << " " << bnd.min(1) << " " << bnd.max(0) << " " <<  bnd.max(1) << " " ;
+        out << (bnd.min)(0) << " " << (bnd.min)(1) << " " << (bnd.max)(0) << " " <<  (bnd.max)(1) << " " ;
         
         for ( boost::uint32_t pi = 0; pi < ids.size(); ++pi )
         {
diff -r 02902673a24d -r 8dc111adfbfa apps/lasindex_test.cpp
--- a/apps/lasindex_test.cpp	Tue Jan 11 09:26:42 2011 -0800
+++ b/apps/lasindex_test.cpp	Wed Jan 12 08:31:50 2011 -0800
@@ -631,60 +631,60 @@
 											{
 												CovgStr = "middle half of all 3 axes";
 												filterBounds = Bounds<double>
-													(indexBounds.min(0) + .25 * RangeX,
-													indexBounds.min(1) + .25 * RangeY,
-													indexBounds.min(2) + .25 * RangeZ,
-													indexBounds.max(0) - .25 * RangeX,
-													indexBounds.max(1) - .25 * RangeY,
-													indexBounds.max(2) - .25 * RangeZ);
+													((indexBounds.min)(0) + .25 * RangeX,
+													(indexBounds.min)(1) + .25 * RangeY,
+													(indexBounds.min)(2) + .25 * RangeZ,
+													(indexBounds.max)(0) - .25 * RangeX,
+													(indexBounds.max)(1) - .25 * RangeY,
+													(indexBounds.max)(2) - .25 * RangeZ);
 												break;
 											} // 1
 											case 2:
 											{
 												CovgStr = "upper left, all Z range";
 												filterBounds = Bounds<double>
-													(indexBounds.min(0),
-													indexBounds.min(1) + .5 * RangeY,
-													indexBounds.min(2),
-													indexBounds.min(0) + .5 * RangeX,
-													indexBounds.max(1),
-													indexBounds.max(2));
+													((indexBounds.min)(0),
+													(indexBounds.min)(1) + .5 * RangeY,
+													(indexBounds.min)(2),
+													(indexBounds.min)(0) + .5 * RangeX,
+													(indexBounds.max)(1),
+													(indexBounds.max)(2));
 												break;
 											} // 2
 											case 3:
 											{
 												CovgStr = "upper right, all Z range";
 												filterBounds = Bounds<double>
-													(indexBounds.min(0) + .5 * RangeX,
-													indexBounds.min(1) + .5 * RangeY,
-													indexBounds.min(2),
-													indexBounds.max(0),
-													indexBounds.max(1),
-													indexBounds.max(2));
+													((indexBounds.min)(0) + .5 * RangeX,
+													(indexBounds.min)(1) + .5 * RangeY,
+													(indexBounds.min)(2),
+													(indexBounds.max)(0),
+													(indexBounds.max)(1),
+													(indexBounds.max)(2));
 												break;
 											} // 3
 											case 4:
 											{
 												CovgStr = "lower left, all Z range";
 												filterBounds = Bounds<double>
-													(indexBounds.min(0),
-													indexBounds.min(1),
-													indexBounds.min(2),
-													indexBounds.min(0) + .5 * RangeX,
-													indexBounds.min(1) + .5 * RangeY,
-													indexBounds.max(2));
+													((indexBounds.min)(0),
+													(indexBounds.min)(1),
+													(indexBounds.min)(2),
+													(indexBounds.min)(0) + .5 * RangeX,
+													(indexBounds.min)(1) + .5 * RangeY,
+													(indexBounds.max)(2));
 												break;
 											} // 4
 											case 5:
 											{
 												CovgStr = "lower right, all Z range";
 												filterBounds = Bounds<double>
-													(indexBounds.min(0)+ .5 * RangeX,
-													indexBounds.min(1),
-													indexBounds.min(2),
-													indexBounds.max(0),
-													indexBounds.min(1) + .5 * RangeY,
-													indexBounds.max(2));
+													((indexBounds.min)(0)+ .5 * RangeX,
+													(indexBounds.min)(1),
+													(indexBounds.min)(2),
+													(indexBounds.max)(0),
+													(indexBounds.min)(1) + .5 * RangeY,
+													(indexBounds.max)(2));
 												break;
 											} // 5
                                             default:
diff -r 02902673a24d -r 8dc111adfbfa apps/laskernel.cpp
--- a/apps/laskernel.cpp	Tue Jan 11 09:26:42 2011 -0800
+++ b/apps/laskernel.cpp	Wed Jan 12 08:31:50 2011 -0800
@@ -63,7 +63,7 @@
     static int lastTick = -1;
     int tick = static_cast<int>(complete * 40.0);
 
-    tick = (std::min)(40, std::max(0, tick));
+    tick = (std::min)(40, (std::max)(0, tick));
 
     // Have we started a new progress run?  
     if (tick < lastTick && lastTick >= 39)
@@ -430,7 +430,7 @@
     if (vm.count("minx")) 
     {
         double minx = vm["minx"].as< double >();
-        extent.min(0, minx);
+        (extent.min)(0, minx);
         bSetExtent = true;
         if (verbose)
             std::cout << "Setting minx to: " << minx << std::endl;
@@ -439,7 +439,7 @@
     if (vm.count("maxx")) 
     {
         double maxx = vm["maxx"].as< double >();
-        extent.max(0, maxx);
+        (extent.max)(0, maxx);
         bSetExtent = true;
         if (verbose)
             std::cout << "Setting maxx to: " << maxx << std::endl;
@@ -448,7 +448,7 @@
     if (vm.count("miny")) 
     {
         double miny = vm["miny"].as< double >();
-        extent.min(1, miny);
+        (extent.min)(1, miny);
         bSetExtent = true;
         if (verbose)
             std::cout << "Setting miny to: " << miny << std::endl;
@@ -457,7 +457,7 @@
     if (vm.count("maxx")) 
     {
         double maxy = vm["maxy"].as< double >();
-        extent.max(1, maxy);
+        (extent.max)(1, maxy);


More information about the Liblas-commits mailing list