download: go get -u github.com/softlandia/glasio
install: go install
The library makes it easy to read or write data in LAS format. The main reason for the development was the need to read and standardize a large number of LAS files obtained from various sources
Features:
- The encoding is determined automatically
- On reading perform validation of the key parameters and integrity of the structure LAS file
- Messages are generated for all inconsistencies:
- zero value of important parameters
- depth step change in data section
- lack of curves section
- conversion errors to a numerical value
- mismatch of the step parameter declared in the header to the actual
- duplication of curve names
- Excluding critical errors, the library allows you to read the file and get data
- Saving a file ensures the integrity of the structure and its readability for most other programs
- It is possible to specify a dictionary of standard mnemonics; when reading a file, messages about curves that do not match the specified ones will be generated
- It is possible to specify a dictionary of automatic substitution of mnemonics, respectively, curves with the given names will be renamed
Wrapped (WRAP) las files are not supported
- github.com/softlandia/cpd
- github.com/softlandia/xlib
simple
- make empty LAS file
- reads sample file "expand_points_01.las", write md file with messages
- saves the recovered LAS file "expand_points_01+.las"
repaire
- reads all LAS files in current folder
- saves the recovered files to the same folder
lasin
- reads LAS file
- print warning
coverage 91%
The "data" folder contains files for testing, no remove/change/add
access to main parameters:
las.VERS()
las.WRAP()
las.STEP()
las.STRT()
las.STOP()
las.NULL()
las.WELL()
number of points and curves:
las.NumPoints() - number of points
len(las.Logs) - number of curves
access to curves and data:
las.Logs[0].D[0] - first depth
las.Logs[1].V[100] - value of first curve on 101 depth step
las.Logs[2].Name - name of second curve
las.Logs[2].Unit - unit of second curve
las.Logs[2].Mnemonic - mnemonic of second curve, the value is determined if the dictionary was applied
if las file contains duplication of any parameter, then use the first in curve section used all curves name. The subsequent duplicated parameter is renamed.
extended:
x, y, "message text"
x - section number
y - line number of input file