Hi Bastien,
running LAStools from within R works quite easy using system() and
paste() commands, please find a short example below.
There is only one little trap that you have to avoid: Do not use
linebreaks within the paste() command, otherwise LAStools will not
work...
Best,
Tim
#### Begin: R Example###
# Rotate, reoffset, thin out and change to las
system(paste("C:/Users/tim/Documents/LAStools/bin/txt2las -i
D:/faro/original_txt/Abt30k.xyz -rotate_xy -8.25 0 0 -reoffset 0 0 0
-parse xyz -rescale 0.00001 0.00001 0.00001 -o
D:/faro/ALL_POINTS/temp_all/30k_rot.laz -olaz"))
# translate
system(paste("C:/Users/tim/Documents/LAStools/bin/las2las -i
D:/faro/ALL_POINTS/temp_all/30k_rot.laz -translate_xyz -3329.372
282345.7 0 -reoffset -3329.372 282345.7 0 -o
D:/faro/ALL_POINTS/30k_proj.laz -olaz"))
# lasindex for faster processing
system(paste("C:/Users/bokuadmin/Documents/LAStools/bin/lasindex -i
D:/faro/ALL_POINTS/30k_proj.laz"))
#### End: R Example###
--
Dr. Tim Ritter
Senior Scientist
Fon:
+43-1-47654-91414
Fax:
+43-1-47654-2991414
Universität für Bodenkultur
Institut für Waldwachstum
Peter-Jordan-Str. 82
1190 Wien
ÖSTERREICH
University of Natural Resources and Life Sciences
Institute of Forest Growth
Peter-Jordan-Str. 82
1190 Vienna
AUSTRIA
an email to
lastools+u...@googlegroups.com.