[Liblas-commits] hg-main-tree: dead code

liblas-commits at liblas.org liblas-commits at liblas.org
Fri Apr 22 15:30:51 EDT 2011


details:   http://hg.libpc.orghg-main-tree/rev/b6be2b7ee071
changeset: 629:b6be2b7ee071
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Fri Apr 22 12:29:25 2011 -0700
description:
dead code
Subject: hg-main-tree: now building against gdal 1.8

details:   http://hg.libpc.orghg-main-tree/rev/636f4c140d64
changeset: 630:636f4c140d64
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Fri Apr 22 12:30:36 2011 -0700
description:
now building against gdal 1.8

diffstat:

 apps/pcview/main.cpp               |  65 --------------------------------------
 mpg-config.bat                     |   6 +-
 test/unit/SpatialReferenceTest.cpp |   2 +-
 3 files changed, 4 insertions(+), 69 deletions(-)

diffs (110 lines):

diff -r 899f40112f57 -r 636f4c140d64 apps/pcview/main.cpp
--- a/apps/pcview/main.cpp	Fri Apr 22 11:12:12 2011 -0700
+++ b/apps/pcview/main.cpp	Fri Apr 22 12:30:36 2011 -0700
@@ -228,71 +228,6 @@
 }
 
 
-static void readFile(Controller& controller, const string& file)
-{
-    boost::timer timer;
-
-    libpc::Stage* reader = new libpc::drivers::las::LasReader(file);
-    libpc::Stage* stage = reader;
-    
-    cout << "file has " << stage->getNumPoints() << " points\n";
-
-    libpc::Stage* decimator = NULL;
-    if (factor > 0)
-    {
-        assert(maxPoints * factor >= stage->getNumPoints()); // make sure we cover the whole file
-        decimator = new libpc::filters::DecimationFilter(*stage, factor);
-        stage = decimator;
-    }
-
-    libpc::Stage* colorizer = NULL;
-    if (useColor) 
-    {
-        colorizer = new libpc::filters::ColorFilter(*stage);
-        stage = colorizer;
-    }
-
-    boost::uint32_t numPoints = (boost::uint32_t)stage->getNumPoints();
-    numPoints = std::min(numPoints, maxPoints);
-    cout << "ready to read " << numPoints << " points\n";
-    cout << "  elapsed time: " << timer.elapsed() << " seconds" << std::endl;
-
-#if 0
-    ThreadArgs t1arg(controller, *stage, 0, numPoints);
-    givePointsToEngine(&t1arg);
-    const boost::uint32_t numRead1 = t1arg.m_numRead;
-    cout << "moved " << numRead1 << " points into buffer1 done\n";
-#else
-    ThreadArgs t1arg(controller, *stage, 0, numPoints/2);
-    ThreadArgs t2arg(controller, *stage, numPoints/2, numPoints/2);
-    boost::thread t1(givePointsToEngine, &t1arg);
-    boost::thread t2(givePointsToEngine, &t2arg);
-
-    t1.join();
-    t2.join();
-
-    const boost::uint32_t numRead1 = t1arg.m_numRead;
-    const boost::uint32_t numRead2 = t2arg.m_numRead;
-
-    cout << "moved " << numRead1 << " points into buffer1 done\n";
-    cout << "moved " << numRead2 << " points into buffer2 done\n";
-#endif
-
-    cout << "done reading points\n";
-    cout << "  elapsed time: " << timer.elapsed() << " seconds" << std::endl;
-    
-    const libpc::Bounds<double>& bounds = stage->getBounds();
-    controller.setBounds((float)bounds.getMinimum(0), (float)bounds.getMinimum(1), (float)bounds.getMinimum(2), 
-                         (float)bounds.getMaximum(0), (float)bounds.getMaximum(1), (float)bounds.getMaximum(2));
-
-    delete colorizer;
-    delete decimator;
-    delete reader;
-
-    return;
-}
-
-
 static void readFileSimple(Controller& controller, const string& file)
 {
     boost::timer timer;
diff -r 899f40112f57 -r 636f4c140d64 mpg-config.bat
--- a/mpg-config.bat	Fri Apr 22 11:12:12 2011 -0700
+++ b/mpg-config.bat	Fri Apr 22 12:30:36 2011 -0700
@@ -8,7 +8,7 @@
 set LIBLAS_DIR=d:\dev\liblas
 set LASZIP_DIR=d:\dev\laszip
 set OSGEO4W_DIR=C:\OSGeo4W
-set OSGEO4W_GDAL=C:\OSGeo4W\apps\gdal-17
+set GDAL_DIR=d:\dev\gdal
 set BOOST_DIR="C:\Utils\boost_1_45_0-win32"
 set ORACLE_HOME=%OSGEO4W_DIR%
 
@@ -35,8 +35,8 @@
     -DFREEGLUT_INCLUDE_DIR=%FREEGLUT_DIR%\include ^
     -DGLUT_LIBRARY=%FREEGLUT_DIR%\lib ^
     -DGLUT_INCLUDE_DIR=%FREEGLUT_DIR%\include ^
-    -DGDAL_INCLUDE_DIR=%OSGEO4W_GDAL%\include ^
-    -DGDAL_LIBRARY=%OSGEO4W_GDAL%\lib\gdal_i.lib ^
+    -DGDAL_INCLUDE_DIR=%GDAL_DIR%\gcore ^
+    -DGDAL_LIBRARY=%GDAL_DIR%\gdal_i.lib ^
     -DTIFF_INCLUDE_DIR=%OSGEO4W_DIR%\include ^
     -DTIFF_LIBRARY=%OSGEO4W_DIR%\lib\libtiff_i.lib ^
     -DGEOTIFF_INCLUDE_DIR=%OSGEO4W_DIR%\include ^
diff -r 899f40112f57 -r 636f4c140d64 test/unit/SpatialReferenceTest.cpp
--- a/test/unit/SpatialReferenceTest.cpp	Fri Apr 22 11:12:12 2011 -0700
+++ b/test/unit/SpatialReferenceTest.cpp	Fri Apr 22 12:30:36 2011 -0700
@@ -80,7 +80,7 @@
 
     ref.setProj4(proj4_ellps);
     const std::string ret2 = ref.getProj4();
-    BOOST_CHECK(ret2 == proj4_ellps);
+    BOOST_CHECK(ret == proj4 || ret == proj4_ellps);
 
     return;
 }


More information about the Liblas-commits mailing list