Version 5 (modified by dac, 8 years ago) (diff)

ARSF to NERC-ARF

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 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 laszip.

Converting on the JASMIN platform

If you are accessing NERC-ARF data archived at NEODC and have an account on 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 ARSF DEM Scripts to export as ENVI format and then convert to ASCII using 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

Back to FAQ