title: How to get what is stored in 'data' field of las point using liblas?
body: <p>I am working with mulipulse lidar data that collects points along a number of lines within the flight path. I am trying to determine the name and number of individual lines within the las file. I am using liblas module in python.</p>
  
  <p>I found <a href="http://pydoc.net/Python/libLAS/1.6.0/liblas.point/" rel="nofollow">this documentation</a> that explains the different fields stored in an las file.  It mentions a data field (get_data and set_data) at the very bottom of the page. </p>
  
  <p>The 'point data format' and 'point data record length' in the header set aside space for this 'data' field.  My header says I have 28 bytes set aside for the data field, and there are 28 values stored in the data field.  The 19th value (at least in two datasets from two different sensors) refers to the line number.  I have a single value in single pulse data and 4 in multi-pulse data. </p>
  
  <p>I was wondering if there is a standard for what is stored in this field or if it is proprietary.</p>
  
  <p>Also, as a way to get the name of each scan line, I wrote the following code:</p>
  
  <pre><code>import liblas
  from liblas import file as lasfile
  
  # Get parameters
  las_file = r"E:\Testing\00101.las"
  
  f = lasfile.File(las_file, mode='r')
  
  line_list = []
  counter = 0
  for p in f:
      line_num = p.data[18]
      if line_num not in line_list:
          line_list.append(line_num)
      counter += 1
  print line_list
  </code></pre>
  
  <p>It results with the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "D:\Tools\Python_Scripts\point_info.py", line 46, in &lt;module&gt;
      line_num = p.data[18]
    File "C:\Python27\ArcGIS10.1\lib\site-packages\liblas\point.py", line 560, in get_data
      length = self.header.data_record_length
    File "C:\Python27\ArcGIS10.1\lib\site-packages\liblas\point.py", line 546, in get_header
      return header.Header(handle=core.las.LASPoint_GetHeader(self.handle))
  WindowsError: [Error -529697949] Windows Error 0xE06D7363
  </code></pre>
  
  <p>Does anyone know more about the line numbers stored in the las point/header?  Can anyone explain the error?  It seems to allocate nearly 2gb of ram before I get the error.  I am on win xp, so I'm guessing its a memory error, but I don't understand why accessing this 'data' field hogs memory.  Any help is greatly appreciated. </p>