[Liblas-commits] hg: fix up
liblas-commits at liblas.org
liblas-commits at liblas.org
Fri Jan 14 10:43:44 EST 2011
details: http://hg.liblas.orghg/rev/15e8dfd2e14b
changeset: 2765:15e8dfd2e14b
user: Howard Butler <hobu.inc at gmail.com>
date: Fri Jan 14 09:42:49 2011 -0600
description:
fix up
Subject: hg: add test of writing/reading compressed file
details: http://hg.liblas.orghg/rev/93c76cdd1a71
changeset: 2766:93c76cdd1a71
user: Howard Butler <hobu.inc at gmail.com>
date: Fri Jan 14 09:43:03 2011 -0600
description:
add test of writing/reading compressed file
Subject: hg: m_record is now gone -- no longer used
details: http://hg.liblas.orghg/rev/381ffdfa435a
changeset: 2767:381ffdfa435a
user: Howard Butler <hobu.inc at gmail.com>
date: Fri Jan 14 09:43:25 2011 -0600
description:
m_record is now gone -- no longer used
diffstat:
include/liblas/detail/writer/point.hpp | 2 -
python/tests/File.txt | 36 +++++++++++++++++++++++++++++++++-
python/tests/Header.txt | 2 +-
3 files changed, 36 insertions(+), 4 deletions(-)
diffs (83 lines):
diff -r 5bdc71863dd0 -r 381ffdfa435a include/liblas/detail/writer/point.hpp
--- a/include/liblas/detail/writer/point.hpp Fri Jan 14 08:25:57 2011 -0600
+++ b/include/liblas/detail/writer/point.hpp Fri Jan 14 09:43:25 2011 -0600
@@ -82,8 +82,6 @@
std::ostream& m_ofs;
HeaderPtr m_header;
-
- PointRecord m_record;
Schema m_format;
diff -r 5bdc71863dd0 -r 381ffdfa435a python/tests/File.txt
--- a/python/tests/File.txt Fri Jan 14 08:25:57 2011 -0600
+++ b/python/tests/File.txt Fri Jan 14 09:43:25 2011 -0600
@@ -304,6 +304,39 @@
630320.96
630280.89
+ >>> comp_header = header.Header()
+ >>> comp_header.minor_version = 2
+ >>> comp_header.compressed = True
+ >>> compressed = file.File('output.laz', mode='w', header=comp_header)
+
+ >>> comp_header.compressed
+ True
+
+ >>> for i in points:
+ ... compressed.write(i)
+
+ >>> compressed.close()
+ >>> del compressed
+
+ >>> read_compressed = file.File('output.laz', mode='r')
+
+ >>> read_compressed.header.compressed
+ True
+
+ >>> for i in read_compressed:
+ ... print round(i.x, 6)
+ 630262.3
+ 630282.45
+ 630300.08
+ 630346.83
+ 630327.59
+ 630323.57
+ 630320.96
+ 630280.89
+
+
+ >>> read_compressed.close()
+ >>> del read_compressed
# The following tests writing out point data that are larger in size than
# the base point format, allowing you to store extra data.
@@ -368,7 +401,7 @@
>>> os.remove('junk3.las')
>>> os.remove('junk4.las')
-# >>> os.remove('junk5.las')
+# >>> os.remove('junk5.las')
>>> f = file.File('junk.las', mode="w", header=h)
>>> import liblas.core
@@ -384,5 +417,6 @@
>>> import os
>>> os.remove('junk.las')
+
diff -r 5bdc71863dd0 -r 381ffdfa435a python/tests/Header.txt
--- a/python/tests/Header.txt Fri Jan 14 08:25:57 2011 -0600
+++ b/python/tests/Header.txt Fri Jan 14 09:43:25 2011 -0600
@@ -48,7 +48,7 @@
datetime.datetime(2008, 3, 19, 0, 0)
>>> h.software_id
- 'libLAS 1.6.0b2'
+ 'libLAS 1.6.0b4'
>>> h.software_id = 'hobu'
>>> h.software_id
'hobu'
More information about the Liblas-commits
mailing list