Reference

las2txt(1)

output ASRPS LAS files into ASCII text

NAME

las2txt - output ASRPS LAS files into ASCII text

SYNOPSIS

las2txt [-h | -i <infile> -o <outfile> -t <format> | -formats]

DESCRIPTION

las2txt allows you to output ASRPS LAS files into ASCII text.

The 'FC-parse txyzF[0]' flag specifies how to format each line of the ASCII file. For example, 'FCtxyziaF[0]' means that the first number of each line should be the gpstime, the next three numbers should be the x, y, and z coordinate, the next number should be the intensity and the next number should be the scan angle.

Supported entries

•

a - scan angle

•

i - intensity

•

n - number of returns for given pulse

•

r - number of this return

•

c - classification

•

u - user data

•

p - point source ID

•

e - edge of flight line flag

•

d - direction of scan flag

•

R - red channel of RGB color

•

G - green channel of RGB color

•

B - blue channel of RGB color

•

M - vertex index number

Separators

The 'FC-sep spaceF[0]' flag specifies what separator to use. The default is a space. The following list is valid for separator characters (case sensitive):

•

tab

•

comma

•

colon

•

hyphen

•

dot

•

semicolon

Header Separators

The 'FC-header poundF[0]' flag results in the header information being printed at the beginning of the ASCII file in form of a comment that starts with the special character '#'. Other possible special characters include (case sensitive):

•

percent

•

dollar

•

semicolon

•

comma

•

star

•

colon

•

semicolon

OPTIONS

las2txt options:

FC-hF[0], FC--helpF[0]

produce help message

FC-iF[0] arg, FC--inputF[0] arg

input LAS file.

FC-oF[0] arg, FC--outputF[0] arg

output text file. Use 'stdout' if you want it written to the standard output stream

FC--parseF[0] arg

The 'FC--parse txyzF[0]' flag specifies how to format each line of the ASCII file.

For example, 'FCtxyziaF[0]' means that the first number of each line should be the gpstime, the next three numbers should be the x, y, and z coordinate, the next number should be the intensity and the next number should be the scan angle.

The supported entries are:

•

x - x coordinate as a double

•

y - y coordinate as a double

•

z - z coordinate as a double

•

X - x coordinate as unscaled integer

•

Y - y coordinate as unscaled integer

•

Z - z coordinate as unscaled integer

•

a - scan angle

•

i - intensity

•

n - number of returns for given pulse

•

r - number of this return

•

c - classification number

•

C - classification name

•

u - user data

•

p - point source ID

•

e - edge of flight line

•

d - direction of scan flag

•

R - red channel of RGB color

•

G - green channel of RGB color

•

B - blue channel of RGB color

•

M - vertex index number

FC--precisionF[0] arg

The number of decimal places to use for x,y,z,[t] output. FC--precision 7 7 3F[0] FC--precision 3 3 4 6F[0] If you don't specify any precision, las2txt uses the implicit values defined by the header's scale value (and a precision of 8 is used for any time values.)

FC--delimiterF[0] arg

The character to use for delimiting fields in the output. FC--delimiter ","F[0] FC--delimiter ""F[0] FC--delimiter " "F[0]

FC--labelsF[0]

Print row of header labels

FC--headerF[0]

Print header information

FC-vF[0], FC--verboseF[0]

Verbose message output

FC--xmlF[0]

Output as XML. No formatting given by FC--parseF[0] is respected in this case.

FC--stdoutF[0]

Output data to stdout

Filtering options:

FC-eF[0] arg, FC--extentF[0] arg

Extent window that points must fall within to keep. Use a comma-separated or quoted, space-separated list, for example, FC-e minx, miny, maxx, maxyF[0] or FC-e minx, miny, minz, maxx, maxy, maxzF[0] FC-e "minx miny minz maxx maxy maxz"F[0]

FC--minxF[0] arg

Extent must be greater than or equal to minx to be kept. FC--minx 1234.0F[0]

FC--minyF[0] arg

Extent must be greater than or equal to miny to be kept. FC--miny 5678.0F[0]

FC--minzF[0] arg

Extent must be greater than or equal to minz to be kept. If maxx and maxy are set but not minz *and maxz, all z values are kept. FC--minz 0.0F[0]

FC--maxxF[0] arg

Extent must be less than or equal to maxx to be kept. FC--maxx 1234.0F[0]

FC--maxyF[0] arg

Extent must be less than or equal to maxy to be kept. FC--maxy 5678.0F[0]

FC--maxzF[0] arg

Extent must be less than or equal to maxz to be kept. If maxx and maxy are set but not maxz *and minz, all z values are kept. FC--maxz 10.0F[0]

FC-tF[0] arg, FC--thinF[0] arg (=0)

Simple decimation-style thinning. Thin the file by removing every t'th point from the file.

FC--last-return-onlyF[0]

Keep last returns (cannot be used with FC--first-return-onlyF[0])

FC--first-return-onlyF[0]

Keep first returns (cannot be used with FC--last-return-onlyF[0])

FC--keep-returnsF[0] arg

A list of return numbers to keep in the output file: FC--keep-returns 1 2 3F[0]

FC--drop-returnsF[0] arg

Return numbers to drop. For example, FC--drop-returns 2 3 4 5F[0]

FC--valid_onlyF[0]

Keep only valid points

FC--keep-classesF[0] arg

A list of classifications to keep: FC--keep-classes 2 4 12F[0] FC--keep-classes 2F[0]

FC--drop-classesF[0] arg

A comma-separated list of classifications to drop: FC--drop-classes 1,7,8F[0] FC--drop-classes 2F[0]

FC--keep-intensityF[0] arg

Range in which to keep intensity. The following expression types are supported: FC--keep-intensity 0-100F[0] FC--keep-intensity <200F[0] FC--keep-intensity >400F[0] FC--keep-intensity >=200F[0]

FC--drop-intensityF[0] arg

Range in which to drop intensity. The following expression types are supported: FC--drop-intensity <200F[0] FC--drop-intensity >400F[0] FC--drop-intensity >=200F[0]

FC--keep-timeF[0] arg

Range in which to keep time. The following expression types are supported: FC--keep-time 413665.2336-414092.8462F[0] FC--keep-time <414094.8462F[0] FC--keep-time >413665.2336F[0] FC--keep-time >=413665.2336F[0]

FC--drop-timeF[0] arg

Range in which to drop time. The following expression types are supported: FC--drop-time <413666.2336F[0] FC--drop-time >413665.2336F[0] FC--drop-time >=413665.2336F[0]

FC--keep-scan-angleF[0] arg

Range in which to keep scan angle. The following expression types are supported: FC--keep-scan-angle 0-100F[0] FC--keep-scan-angle <100F[0] FC--keep-scan-angle <=100F[0]

FC--drop-scan-angleF[0] arg

Range in which to drop scan angle. The following expression types are supported: FC--drop-scan-angle <30F[0] FC--drop-scan-angle >100F[0] FC--drop-scan-angle >=100F[0]

FC--keep-colorF[0] arg

Range in which to keep colors. Define colors as two 3-tuples (R,G,B-R,G,B): FC--keep-color '0,0,0-125,125,125'F[0]

FC--drop-colorF[0] arg

Range in which to drop colors. Define colors as two 3-tuples (R,G,B-R,G,B): FC--drop-color '255,255,255-65536,65536,65536'F[0]

For more information, see the full documentation for lasinfo at: ⟨http://liblas.org/utilities/las2txt.html⟩

EXAMPLE

Simple conversion to text file

FC
$ las2txt -i lidar.las -o lidar.txt -parse xyz
      F[0]

converts LAS file to ASCII and places the x, y, and z coordinate of each point at the 1st, 2nd, and 3rd entry of each line. The entries are separated by a space.

Specifying a separator

FC
$ las2txt -i lidar.las -o lidar.txt -parse txyzr -sep komma
      F[0]

converts LAS file to ASCII and places the gps_time as the first entry, the x, y, and z coordinates at the 2nd, 3rd, and 4th entry and the number of the return as the 5th entry of each line. The entries are separated by a komma.

Altering the header separator

FC
$ las2txt -i lidar.las -o lidar.txt -parse xyzia -sep semicolon -header pound
      F[0]

converts LAS file to ASCII and places the x, y, and z coordinate at the 1st, 2nd, and 3rd entry, the intensity at the 4th and the scan angle as the 5th entry of each line. The entries are separated by a semicolon. At the beginning of the file we print the header information as a comment starting with a '#' symbol.

Altering the coordinate order

FC
$ las2txt -i lidar.las -o lidar.txt -parse xyzcu -sep tab -header percent
      F[0]

converts LAS file to ASCII and places the x, y, and z coordinate at the 1st, 2nd, and 3rd entry, the classification at the 4th and the user data as the 5th entry of each line. The entries are separated by a semicolon. At the beginning of the file we print the header information as a comment starting with a '%' symbol.

History