[Liblas-commits] hg: remove the need to explicitly set the record length when set...

liblas-commits at liblas.org liblas-commits at liblas.org
Tue Jun 29 15:00:38 EDT 2010


changeset 38e1e3dc53e9 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=38e1e3dc53e9
summary: remove the need to explicitly set the record length when setting the data on a VLR in python

diffstat:

 doc/tutorial/python.txt |  1 -
 python/liblas/vlr.py    |  1 +
 2 files changed, 1 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r 431a017ac12f -r 38e1e3dc53e9 doc/tutorial/python.txt
--- a/doc/tutorial/python.txt	Mon Jun 28 12:13:35 2010 -0500
+++ b/doc/tutorial/python.txt	Tue Jun 29 14:00:31 2010 -0500
@@ -202,7 +202,6 @@
 
     v.userid='hobu'
     v.recordid = 12345
-    v.recordlength = len(text)
     v.data = data
 
     h.add_vlr(v)
diff -r 431a017ac12f -r 38e1e3dc53e9 python/liblas/vlr.py
--- a/python/liblas/vlr.py	Mon Jun 28 12:13:35 2010 -0500
+++ b/python/liblas/vlr.py	Tue Jun 29 14:00:31 2010 -0500
@@ -186,6 +186,7 @@
         return data
 
     def set_data(self, data):
+        self.recordlength = len(data)
         pdata = ctypes.cast(data, ctypes.POINTER(ctypes.c_ubyte))
         core.las.LASVLR_SetData(self.handle, pdata, self.recordlength)
     doc = """Raw data (in the form of an array of :class:`ctypes.c_ubyte`)"""


More information about the Liblas-commits mailing list