[Liblas-commits] hg: return clone of header for the file
liblas-commits at liblas.org
liblas-commits at liblas.org
Tue May 11 15:21:07 EDT 2010
changeset e267e798a8e5 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=e267e798a8e5
summary: return clone of header for the file
diffstat:
python/liblas/file.py | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
diffs (48 lines):
diff -r 9eff4b122c70 -r e267e798a8e5 python/liblas/file.py
--- a/python/liblas/file.py Tue May 11 10:50:06 2010 -0500
+++ b/python/liblas/file.py Tue May 11 14:21:01 2010 -0500
@@ -124,10 +124,7 @@
if self._header == None:
self.handle = core.las.LASReader_Create(self.filename)
- self._header = lasheader.Header(
- handle=core.las.LASReader_GetHeader(self.handle),
- owned=True,
- copy=True)
+ self._header = core.las.LASReader_GetHeader(self.handle)
else:
self.handle = \
core.las.LASReader_CreateWithHeader(self.filename,
@@ -146,10 +143,7 @@
if self._mode == 'w' and '+' not in self._mode:
if self._header == None:
- self._header = lasheader.Header(
- handle=core.las.LASHeader_Create(),
- owned=True,
- copy=True)
+ self._header = core.las.LASHeader_Create()
self.handle = core.las.LASWriter_Create(self.filename,
self._header.handle,
1)
@@ -165,10 +159,7 @@
if '+' in self._mode and 'r' not in self._mode:
if self._header == None:
reader = core.las.LASReader_Create(self.filename)
- self._header = lasheader.Header(
- handle=core.las.LASReader_GetHeader(reader),
- owned=True,
- copy=True)
+ self._header = core.las.LASReader_GetHeader(reader)
core.las.LASReader_Destroy(reader)
self.handle = core.las.LASWriter_Create(self.filename,
self._header.handle,
@@ -239,7 +230,7 @@
def get_header(self):
"""Returns the liblas.header.Header for the file"""
- return self._header
+ return lasheader.Header(handle=self._header.handle, copy=True)
def set_header(self, header):
"""Sets the liblas.header.Header for the file. If the file is in \
More information about the Liblas-commits
mailing list