
.. raw:: pdf

    PageBreak
    
.. _las2las_old:
    
****************************************************************
  las2las-old
****************************************************************

:Author: Martin Isenburg
:Contact: isenburg@cs.unc.edu
:Author: Howard Butler
:Contact: hobu.inc@gmail.com

Description
-----------

`las2las_old` reads and writes LiDAR data in the ASPRS LAS 1.0 and 1.1 formats while 
modifying its contents. While `lasinfo_old` can do a few simple operations like 
updating header information, more drastic changes, like removing points or 
altering values, will require `las2las_old`.  `las2las_old` is expected to be used for 
modifying single files at a time, and all :ref:`las2las` operations require multiple 
read passes through the points.   Some examples of operations `las2las` can be 
used for include:

* clipping of points to those that lie within a certain region specified 
  by a bounding box (--clip)
* eliminating points that are the second return (--eliminate_return 2), 
* eliminating points that have a scan angle 
  above some threshold (--eliminate_scan_angle_above 5)
* eliminating points that have an intensity below some 
  threshold (--eliminate_intensity_below 15)
* extracting only first (--first-only) or last (--last-only) returns
* changing the format from LAS 1.0 to 1.1 or vice versa
* eliminating points of a given classification (--eliminate class 2)

`las2las_old` is a port of Martin Isenburg's `las2las_old` utility from `LASTools`_ 
to the libLAS library.  For the most part, it is unchanged from Martin's 
utility except for a few differences:

* Text output describing the operation(s) is only provided when the --verbose 
  switch is provided.

* Provides some point validation

* Variable Length Records (VLRs) are carried forward by default.

* Supports format (1.1->1.0 & 1.0->1.1) conversion.

* GNU-style arguments and switches (although most of the switches used by 
  Martin's utilities should continue to work).
  
Usage
-----

Clipping with a rectangle
~~~~~~~~~~~~~~~~~~~~~~~~~

::

  $ las2las-old --input in.las --output out.las --clip 63025000 483450000 63050000 483475000

clips points of in.las with x<63025000 or y<483450000 or x>63050000
or y>483475000 and stores surviving points to out.las. Note that
clip expects the scaled integer values that the points are stored
with (not the floating point coordinates they represent).

Eliminating specified returns
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

::
  
  $ las2las-old --input in.las --output out.las --eliminate_return 1

eliminates all points of in.las that are designated first returns by the 
value in their return_number field and stores surviving points to out.las.

Limiting based on scan angle
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

::

  $ las2las-old --input in.las --output out.las --eliminate_scan_angle_above 15

eliminates all points of in.las whose scan angle is above 15 or below -15 
and stores surviving points to out.las.

Limiting based on intensity
~~~~~~~~~~~~~~~~~~~~~~~~~~~

::

  $ las2las-old --input in.las --output out.las --eliminate_intensity_below 1000 
  
eliminates all points of in.las whose intensity is below 1000 and stores 
surviving points to out.las.

Extract last returns
~~~~~~~~~~~~~~~~~~~~

::
  
  $ las2las-old --input in.las --output out.las --last_only

extracts all last return points from in.las and stores them to out.las.

Throw out invalid data
~~~~~~~~~~~~~~~~~~~~~~

::

  $ las2las-old --input in.las --output out.las --skip_invalid

removes invalid (according to the ASPRS LAS file format specification) points.  
This switch should only be required in a few special circumstances.

Eliminate ground points
~~~~~~~~~~~~~~~~~~~~~~~

::

  $ las2las-old --input in.las --output out.las --eliminate_class 2

removes points with that have a classification of 2.  Points with a 
classification of 2 are conventionally called ground points, but that convention 
may not be followed for older LAS 1.0 files.

Convert to 1.1
~~~~~~~~~~~~~~~~~~~~~~

::

  $ las2las-old --input in.las --output out.las --format 1.1
  
converts the in.las file to a 1.1-formatted file.  For the most part, this 
conversion is "in name only."  For example, 


 

Usage
-----

::

    C:\lastools\bin>las2las-old -h
    usage:
    las2las-old -remove_extra_header in.las out.las
    las2las-old -i in.las -clip 63000000 483450000 63050000 483500000 -o out.las
    las2las-old -i in.las -eliminate_return 2 -o out.las
    las2las-old -i in.las -eliminate_scan_angle_above 15 -o out.las
    las2las-old -i in.las -eliminate_intensity_below 1000 -olas > out.las
    las2las-old -i in.las -first_only -clip 63000000 483450000 63050000 483500000 -o out.las
    las2las-old -i in.las -last_only -eliminate_intensity_below 2000 -olas > out.las
    las2las-old -h

.. _`LAStools`: http://www.cs.unc.edu/~isenburg/lastools/