Changeset 888 for trunk/python/tests

Show
Ignore:
Timestamp:
09/27/08 19:12:14 (3 months ago)
Author:
hobu
Message:

VLR data setting for C/Python APIs #78

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/python/tests/VLR.txt

    r784 r888  
    2020  'libLAS' 
    2121   
     22  >>> v.recordlength = 256 
     23  >>> v.recordlength  
     24  256 
     25   
     26  >>> import ctypes 
     27  >>> data = (ctypes.c_ubyte * 256)() 
     28  >>> data[10] 
     29  0 
     30   
     31  >>> for i in range(256): 
     32  ...     data[i] = 2+i 
     33   
     34  >>> data[10] 
     35  12 
     36  >>> v.data = data 
     37   
     38# Ensure we can round trip the data 
     39  >>> [data[i] for i in range(10)] 
     40  [2, 3, 4, 5, 6, 7, 8, 9, 10, 11] 
     41  >>> [v.data[i] for i in range(10)] 
     42  [2, 3, 4, 5, 6, 7, 8, 9, 10, 11] 
     43 
     44# Ensure poking one array doesn't affect the other 
     45  >>> data[1] = 32 
     46  >>> v.data = data 
     47  >>> data[1] = 3 
     48  >>> v.data[1] 
     49  32 
     50  >>> data[1] 
     51  3 
     52   
     53  >>> [v.data[i] for i in range(10)] 
     54  [2, 32, 4, 5, 6, 7, 8, 9, 10, 11] 
     55   
     56     
    2257  >>> from liblas import file 
    2358  >>> f = file.File('../test/data/srs.las') 
     
    3368  'LASF_Projection' 
    3469   
    35 #  >>> data = v.data 
    36 #  >>> len(data) 
     70  >>> data = v.data 
     71  >>> len(data) 
     72  72 
     73  >>> data[6] 
     74  8 
    3775 
    3876  # Ensure the offset is updated when a VLR is deleted 
     
    4280  >>> h.data_offset 
    4381  633L 
     82   
     83