Output asrps las files into ascii text
las2txt \kx [-h | -i <infile> -o <outfile> -t <format> | -formats]
las2txt allows you to output ASRPS LAS files into ASCII text.
The '\*(T<-parse txyz\*(T>' flag specifies how to format each line of the ASCII file. For example, '\*(T<txyzia\*(T>' 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 '\*(T<-sep space\*(T>' 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 '\*(T<-header pound\*(T>' 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
las2txt options:
\*(T<-h\*(T>, \*(T<--help\*(T>
produce help message
\*(T<-i\*(T> arg, \*(T<--input\*(T> arg
input LAS file.
\*(T<-o\*(T> arg, \*(T<--output\*(T> arg
output text file. Use 'stdout' if you want it written to the standard output stream
\*(T<--parse\*(T> arg
The '\*(T<--parse txyz\*(T>' flag specifies how to format each line of the ASCII file.
For example, '\*(T<txyzia\*(T>' 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
\*(T<--precision\*(T> arg
The number of decimal places to use for x,y,z,[t] output. \*(T<--precision 7 7 3\*(T> \*(T<--precision 3 3 4 6\*(T> 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.)
\*(T<--delimiter\*(T> arg
The character to use for delimiting fields in the output. \*(T<--delimiter ","\*(T> \*(T<--delimiter ""\*(T> \*(T<--delimiter " "\*(T>
\*(T<--labels\*(T>
Print row of header labels
\*(T<--header\*(T>
Print header information
\*(T<-v\*(T>, \*(T<--verbose\*(T>
Verbose message output
\*(T<--xml\*(T>
Output as XML. No formatting given by \*(T<--parse\*(T> is respected in this case.
\*(T<--stdout\*(T>
Output data to stdout
Filtering options:
\*(T<-e\*(T> arg, \*(T<--extent\*(T> arg
Extent window that points must fall within to keep. Use a comma-separated or quoted, space-separated list, for example, \*(T<-e minx, miny, maxx, maxy\*(T> or \*(T<-e minx, miny, minz, maxx, maxy, maxz\*(T> \*(T<-e "minx miny minz maxx maxy maxz"\*(T>
\*(T<--minx\*(T> arg
Extent must be greater than or equal to minx to be kept. \*(T<--minx 1234.0\*(T>
\*(T<--miny\*(T> arg
Extent must be greater than or equal to miny to be kept. \*(T<--miny 5678.0\*(T>
\*(T<--minz\*(T> 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. \*(T<--minz 0.0\*(T>
\*(T<--maxx\*(T> arg
Extent must be less than or equal to maxx to be kept. \*(T<--maxx 1234.0\*(T>
\*(T<--maxy\*(T> arg
Extent must be less than or equal to maxy to be kept. \*(T<--maxy 5678.0\*(T>
\*(T<--maxz\*(T> 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. \*(T<--maxz 10.0\*(T>
\*(T<-t\*(T> arg, \*(T<--thin\*(T> arg (=0)
Simple decimation-style thinning. Thin the file by removing every t'th point from the file.
\*(T<--last-return-only\*(T>
Keep last returns (cannot be used with \*(T<--first-return-only\*(T>)
\*(T<--first-return-only\*(T>
Keep first returns (cannot be used with \*(T<--last-return-only\*(T>)
\*(T<--keep-returns\*(T> arg
A list of return numbers to keep in the output file: \*(T<--keep-returns 1 2 3\*(T>
\*(T<--drop-returns\*(T> arg
Return numbers to drop. For example, \*(T<--drop-returns 2 3 4 5\*(T>
\*(T<--valid_only\*(T>
Keep only valid points
\*(T<--keep-classes\*(T> arg
A list of classifications to keep: \*(T<--keep-classes 2 4 12\*(T> \*(T<--keep-classes 2\*(T>
\*(T<--drop-classes\*(T> arg
A comma-separated list of classifications to drop: \*(T<--drop-classes 1,7,8\*(T> \*(T<--drop-classes 2\*(T>
\*(T<--keep-intensity\*(T> arg
Range in which to keep intensity. The following expression types are supported: \*(T<--keep-intensity 0-100\*(T> \*(T<--keep-intensity <200\*(T> \*(T<--keep-intensity >400\*(T> \*(T<--keep-intensity >=200\*(T>
\*(T<--drop-intensity\*(T> arg
Range in which to drop intensity. The following expression types are supported: \*(T<--drop-intensity <200\*(T> \*(T<--drop-intensity >400\*(T> \*(T<--drop-intensity >=200\*(T>
\*(T<--keep-time\*(T> arg
Range in which to keep time. The following expression types are supported: \*(T<--keep-time 413665.2336-414092.8462\*(T> \*(T<--keep-time <414094.8462\*(T> \*(T<--keep-time >413665.2336\*(T> \*(T<--keep-time >=413665.2336\*(T>
\*(T<--drop-time\*(T> arg
Range in which to drop time. The following expression types are supported: \*(T<--drop-time <413666.2336\*(T> \*(T<--drop-time >413665.2336\*(T> \*(T<--drop-time >=413665.2336\*(T>
\*(T<--keep-scan-angle\*(T> arg
Range in which to keep scan angle. The following expression types are supported: \*(T<--keep-scan-angle 0-100\*(T> \*(T<--keep-scan-angle <100\*(T> \*(T<--keep-scan-angle <=100\*(T>
\*(T<--drop-scan-angle\*(T> arg
Range in which to drop scan angle. The following expression types are supported: \*(T<--drop-scan-angle <30\*(T> \*(T<--drop-scan-angle >100\*(T> \*(T<--drop-scan-angle >=100\*(T>
\*(T<--keep-color\*(T> arg
Range in which to keep colors. Define colors as two 3-tuples (R,G,B-R,G,B): \*(T<--keep-color '0,0,0-125,125,125'\*(T>
\*(T<--drop-color\*(T> arg
Range in which to drop colors. Define colors as two 3-tuples (R,G,B-R,G,B): \*(T<--drop-color '255,255,255-65536,65536,65536'\*(T>
For more information, see the full documentation for lasinfo at: \(lahttp://liblas.org/utilities/las2txt.html\(ra
Simple conversion to text file
\*(T< $ las2txt -i lidar.las -o lidar.txt -parse xyz \*(T>
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
\*(T< $ las2txt -i lidar.las -o lidar.txt -parse txyzr -sep komma \*(T>
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
\*(T< $ las2txt -i lidar.las -o lidar.txt -parse xyzia -sep semicolon -header pound \*(T>
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
\*(T< $ las2txt -i lidar.las -o lidar.txt -parse xyzcu -sep tab -header percent \*(T>
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.