=== Q: How do I convert between LAS and ASCII file formats? === To convert between LAS and ASCII point cloud formats use the free `las2txt` and `txt2las` tools available as part of LAStools. These are available to download from: https://github.com/LAStools/LAStools (note: download also contains paid for tools not required for conversion). Binaries are provided for Windows. For Linux and OS X you need to compile using the included 'Makefile' ==== LAS to ASCII ==== To export as 9 column ASCII files, as delivered by NERC-ARF between 2011 and 2015 use the following command: {{{ las2txt -parse txyzicrna -sep space -i in_las.las -o out_ascii.txt }}} If you need to export in the 8 column format used by NERC-ARF between 2009 and 2010 use the following command instead: {{{ las2txt -parse txyzicrna -sep space -i in_las.las -o out_ascii.txt }}} For more details on available options see the [https://github.com/LAStools/LAStools/blob/master/bin/las2txt_README.txt las2txt README] ==== ASCII to LAS ==== To convert the 9 column ASCII files as delivered by NERC-ARF between 2011 and 2015 to LAS format use the following command: {{{ txt2las -iparse txyzicrna -i in_ascii.txt -o out_las.las }}} To convert the 8 column format used by ARSF between 2009 and 2010 use the following command instead: {{{ txt2las -iparse txyzicra -i in_ascii.txt -o out_las.las }}} To reduce the file size you can change the extension of the output file to '.laz' to save as LASzip files. These can be read by a number of packages and easily converted back to uncompressed LAS files using [https://github.com/LAStools/LAStools/blob/master/bin/laszip_README.txt laszip]. ==== Converting on the JASMIN platform ==== If you are accessing NERC-ARF data archived at [http://neodc.nerc.ac.uk/ NEODC] and have an account on [http://jasmin.ac.uk/ JASMIN] LAStools are installed and can be loaded using: {{{ module load contrib/arsf/lastools }}} If you have access to the ARSF archive it will be mapped as `/neodc/arsf` allowing you to convert ASCII files to LAZ before downloading. ==== Gridded ASCII format ==== If you need to save as a gridded ASCII format (.asc) rather than a point cloud you can use the [https://github.com/pmlrsg/arsf_dem_scripts ARSF DEM Scripts] to export as ENVI format and then convert to ASCII using [http://www.gdal.org/gdal_translate.html gdal_translate]. For example: {{{ las_to_dsm.py in_las.las -o out_raster.dem gdal_translate -of AAIGrid out_raster.dem out_raster.asc }}} [wiki:FAQ Back to FAQ]