[Liblas-commits] hg-main-tree: set systemid back to TerraScan
instead of martin. ...
liblas-commits at liblas.org
liblas-commits at liblas.org
Thu Aug 11 16:31:55 EDT 2011
details: http://hg.libpc.orghg-main-tree/rev/92686b573fe2
changeset: 1041:92686b573fe2
user: Howard Butler <hobu.inc at gmail.com>
date: Thu Aug 11 15:30:32 2011 -0500
description:
set systemid back to TerraScan instead of martin. isenburg shouldn't change the systemid to keep things 'lossless'
Subject: hg-main-tree: don't override srs from previous stage. sorry, I did that
details: http://hg.libpc.orghg-main-tree/rev/121991a07e09
changeset: 1042:121991a07e09
user: Howard Butler <hobu.inc at gmail.com>
date: Thu Aug 11 15:31:12 2011 -0500
description:
don't override srs from previous stage. sorry, I did that
Subject: hg-main-tree: start catching up to new LASzip tests
details: http://hg.libpc.orghg-main-tree/rev/c7f35746ac3c
changeset: 1043:c7f35746ac3c
user: Howard Butler <hobu.inc at gmail.com>
date: Thu Aug 11 15:31:41 2011 -0500
description:
start catching up to new LASzip tests
Subject: hg-main-tree: merge
details: http://hg.libpc.orghg-main-tree/rev/8d9ffb4b7c81
changeset: 1044:8d9ffb4b7c81
user: Howard Butler <hobu.inc at gmail.com>
date: Thu Aug 11 15:31:49 2011 -0500
description:
merge
diffstat:
src/drivers/las/Writer.cpp | 2 --
test/data/laszip/laszip-generated.laz | 0
test/unit/FileUtilsTest.cpp | 10 +++++-----
test/unit/LasReaderTest.cpp | 2 +-
test/unit/LasWriterTest.cpp | 17 +++++++++--------
test/unit/LiblasWriterTest.cpp | 26 +++++++++++++-------------
test/unit/main.cpp | 8 ++++++--
7 files changed, 34 insertions(+), 31 deletions(-)
diffs (218 lines):
diff -r f31c9dca686c -r 8d9ffb4b7c81 src/drivers/las/Writer.cpp
--- a/src/drivers/las/Writer.cpp Thu Aug 11 15:05:37 2011 -0500
+++ b/src/drivers/las/Writer.cpp Thu Aug 11 15:31:49 2011 -0500
@@ -90,8 +90,6 @@
{
Writer::initialize();
- m_spatialReference = getPrevStage().getSpatialReference();
-
m_streamManager.open();
try
diff -r f31c9dca686c -r 8d9ffb4b7c81 test/data/laszip/laszip-generated.laz
Binary file test/data/laszip/laszip-generated.laz has changed
diff -r f31c9dca686c -r 8d9ffb4b7c81 test/unit/FileUtilsTest.cpp
--- a/test/unit/FileUtilsTest.cpp Thu Aug 11 15:05:37 2011 -0500
+++ b/test/unit/FileUtilsTest.cpp Thu Aug 11 15:31:49 2011 -0500
@@ -106,23 +106,23 @@
// check 1-arg version: make absolute when file is relative, via current working dir
const string a = FileUtils::toAbsolutePath("foo.txt");
- BOOST_CHECK(a == root + "/" + "foo.txt");
+ BOOST_CHECK_EQUAL(a, root + "/" + "foo.txt");
// check 1-arg version: make absolute when file is already absolute
const string b = FileUtils::toAbsolutePath(drive + "/baz/foo.txt");
- BOOST_CHECK(b == "A:/baz/foo.txt");
+ BOOST_CHECK_EQUAL(b, drive + "/baz/foo.txt");
// check 2-arg version: make absolute when file relative, via given base
const string c = FileUtils::toAbsolutePath("foo.txt", drive + "/a/b/c/d");
- BOOST_CHECK(c == drive + "/a/b/c/d/foo.txt");
+ BOOST_CHECK_EQUAL(c, drive + "/a/b/c/d/foo.txt");
// check 2-arg version: make absolute when file is relative, via given base (which isn't absolute)
const string d = FileUtils::toAbsolutePath("foo.txt", "x/y/z");
- BOOST_CHECK(d == root + "/" + "x/y/z/" + "foo.txt");
+ BOOST_CHECK_EQUAL(d, root + "/" + "x/y/z/" + "foo.txt");
// check 1-arg version: make absolute when file is already absolute
const string e = FileUtils::toAbsolutePath(drive+"/baz/foo.txt", drive+"/a/b/c/d");
- BOOST_CHECK(e == drive+"/baz/foo.txt");
+ BOOST_CHECK_EQUAL(e, drive+"/baz/foo.txt");
return;
}
diff -r f31c9dca686c -r 8d9ffb4b7c81 test/unit/LasReaderTest.cpp
--- a/test/unit/LasReaderTest.cpp Thu Aug 11 15:05:37 2011 -0500
+++ b/test/unit/LasReaderTest.cpp Thu Aug 11 15:31:49 2011 -0500
@@ -177,7 +177,7 @@
BOOST_AUTO_TEST_CASE(test_random_laz)
{
- pdal::drivers::las::LasReader reader(Support::datapath("1.2-with-color.laz"));
+ pdal::drivers::las::LasReader reader(Support::datapath("laszip/laszip-generated.laz"));
BOOST_CHECK(reader.getDescription() == "Las Reader");
reader.initialize();
diff -r f31c9dca686c -r 8d9ffb4b7c81 test/unit/LasWriterTest.cpp
--- a/test/unit/LasWriterTest.cpp Thu Aug 11 15:05:37 2011 -0500
+++ b/test/unit/LasWriterTest.cpp Thu Aug 11 15:31:49 2011 -0500
@@ -93,40 +93,41 @@
BOOST_AUTO_TEST_CASE(LasWriterTest_test_simple_laz)
{
// remove file from earlier run, if needed
- FileUtils::deleteFile("temp.laz");
+ FileUtils::deleteFile("laszip/LasWriterTest_test_simple_laz.laz");
- pdal::drivers::las::LasReader reader(Support::datapath("1.2-with-color.las"));
+ pdal::drivers::las::LasReader reader(Support::datapath("laszip/basefile.las"));
- std::ostream* ofs = FileUtils::createFile("temp.laz");
+ std::ostream* ofs = FileUtils::createFile(Support::datapath("laszip/LasWriterTest_test_simple_laz.laz"));
{
const boost::uint64_t numPoints = reader.getNumPoints();
// need to scope the writer, so that's it dtor can use the stream
pdal::drivers::las::LasWriter writer(reader, ofs);
- writer.initialize();
-
writer.setCompressed(true);
writer.setDate(0, 0);
writer.setPointFormat(::pdal::drivers::las::PointFormat3);
writer.setSystemIdentifier("");
writer.setGeneratingSoftware("TerraScan");
+ writer.initialize();
+
+
writer.write(numPoints);
}
FileUtils::closeFile(ofs);
{
- pdal::drivers::las::LasReader reader("temp.laz");
+ pdal::drivers::las::LasReader reader(Support::datapath("laszip/LasWriterTest_test_simple_laz.laz"));
}
- bool filesSame = Support::compare_files("temp.laz", Support::datapath("1.2-with-color.laz"));
+ bool filesSame = Support::compare_files(Support::datapath("laszip/LasWriterTest_test_simple_laz.laz"), Support::datapath("laszip/laszip-generated.laz"));
BOOST_CHECK(filesSame);
if (filesSame)
{
- FileUtils::deleteFile("temp.laz");
+ FileUtils::deleteFile("LasWriterTest_test_simple_laz.laz");
}
return;
diff -r f31c9dca686c -r 8d9ffb4b7c81 test/unit/LiblasWriterTest.cpp
--- a/test/unit/LiblasWriterTest.cpp Thu Aug 11 15:05:37 2011 -0500
+++ b/test/unit/LiblasWriterTest.cpp Thu Aug 11 15:31:49 2011 -0500
@@ -53,11 +53,11 @@
BOOST_AUTO_TEST_CASE(LiblasWriterTest_test_simple_las)
{
// remove file from earlier run, if needed
- FileUtils::deleteFile("temp.las");
+ FileUtils::deleteFile("LiblasWriterTest_test_simple_las.las");
LiblasReader reader(Support::datapath("1.2-with-color.las"));
- std::ostream* ofs = FileUtils::createFile("temp.las");
+ std::ostream* ofs = FileUtils::createFile("LiblasWriterTest_test_simple_las.las");
{
// need to scope the writer, so that's it dtor can use the stream
@@ -78,12 +78,12 @@
FileUtils::closeFile(ofs);
- bool filesSame = Support::compare_files("temp.las", Support::datapath("simple.las"));
+ bool filesSame = Support::compare_files("LiblasWriterTest_test_simple_las.las", Support::datapath("simple.las"));
BOOST_CHECK(filesSame);
if (filesSame)
{
- FileUtils::deleteFile("temp.las");
+ FileUtils::deleteFile("LiblasWriterTest_test_simple_las.las");
}
return;
@@ -92,9 +92,9 @@
BOOST_AUTO_TEST_CASE(LiblasWriterTest_test_options)
{
// remove file from earlier run, if needed
- FileUtils::deleteFile("temp.las");
+ FileUtils::deleteFile("LiblasWriterTest_test_options.las");
- Option<std::string> opt("filename", "temp.las");
+ Option<std::string> opt("filename", "LiblasWriterTest_test_options.las");
Options opts(opt);
LiblasReader reader(Support::datapath("1.2-with-color.las"));
@@ -116,12 +116,12 @@
writer.write(numPoints);
}
- bool filesSame = Support::compare_files("temp.las", Support::datapath("simple.las"));
+ bool filesSame = Support::compare_files("LiblasWriterTest_test_options.las", Support::datapath("simple.las"));
BOOST_CHECK(filesSame);
if (filesSame)
{
- FileUtils::deleteFile("temp.las");
+ FileUtils::deleteFile("LiblasWriterTest_test_options.las");
}
return;
@@ -131,11 +131,11 @@
BOOST_AUTO_TEST_CASE(LiblasWriterTest_test_simple_laz)
{
// remove file from earlier run, if needed
- FileUtils::deleteFile("temp.las");
+ FileUtils::deleteFile("laszip/LiblasWriterTest_test_simple_laz.las");
- LiblasReader reader(Support::datapath("1.2-with-color.las"));
+ LiblasReader reader(Support::datapath("laszip/basefile.las"));
- std::ostream* ofs = FileUtils::createFile("temp.laz");
+ std::ostream* ofs = FileUtils::createFile("laszip/LiblasWriterTest_test_simple_laz.laz");
{
// need to scope the writer, so that's it dtor can use the stream
@@ -155,12 +155,12 @@
FileUtils::closeFile(ofs);
- bool filesSame = Support::compare_files("temp.laz", Support::datapath("1.2-with-color.laz"));
+ bool filesSame = Support::compare_files("laszip/LiblasWriterTest_test_simple_laz.laz", Support::datapath("laszip/laszip-generated.laz"));
BOOST_CHECK(filesSame);
if (filesSame)
{
- FileUtils::deleteFile("temp.laz");
+ FileUtils::deleteFile("laszip/LiblasWriterTest_test_simple_laz.laz");
}
return;
diff -r f31c9dca686c -r 8d9ffb4b7c81 test/unit/main.cpp
--- a/test/unit/main.cpp Thu Aug 11 15:05:37 2011 -0500
+++ b/test/unit/main.cpp Thu Aug 11 15:31:49 2011 -0500
@@ -42,8 +42,12 @@
// Testing macros:
// BOOST_TEST_MESSAGE("...")
// BOOST_CHECK(bool)
-
-// for comparing to floating point values, use
+// BOOST_CHECK_EQUAL(t1, t2)
+//
+// The 'CHECK_EQUAL function is preferred to plain 'CHECK, because the former
+// prints out the values of both arguments in the error message.
+//
+// For comparing to floating point values, use
// BOOST_CHECK_CLOSE(a,b,perc)
// where perc is a percentage value in the range [0..100] (typically)
More information about the Liblas-commits
mailing list