Skip to main content

lasfile

Library for reading CWLS Log ASCII Standard v. 1.2, 2.0, and 3.0 .las files.

Installation

pip install lasfile

Usage

Read LAS file

import lasfile

las = lasfile.LASFile(file_path='path/to/file.las')

In order for an lasfile to properly read, and pass a critical error check, it must have the following sections:

  • Version
  • Well
  • Curves
  • Data

View sections in LAS file

las.sections

View section data in LAS file

Using dot notation

As raw ascii text
las.well.raw_data
As pandas dataframe
las.well.df

Using dictionary notation

As raw ascii text
las['well']['raw_data']
As pandas dataframe
las['well']['df']

Write LAS file

The write function allows you to write LAS files based on the sections available in the LASFile object.

Usage:

from lasfile import write

write(las, overwrite=False, file_path='path/to/output/file.las')

Functionality:

  • If a 'file_path' is not passed to the function, the 'write' function will attempt to overwrite the existing file stored in the 'file_path' variable of the LASFile object. Overwrite functionality is disabled by default but can be enabled by setting the 'overwrite' attribute to 'True'.

Limitations:

  • Currently, the write functionality cannot write LAS v. 3.0 files. This feature is under development.
  • LAS v. 3.0 files can be written to LAS v. 2.0 format by setting the 'version' keyword argument of the 'write' function to '2.0'. However, this will result in the loss of any data stored in sections not found in the LAS v. 2.0 format.

Read and Write Capabilities

Version Read Write
1.2 ✔ Working ✔ Working
2.0 ✔ Working ✔ Working
3.0 ✔ Working 🚧 In Development

Errors

View all errors

las.errors

View specific errors

las.open_error
las.read_error
las.split_error
las.version_error
las.parse_errors
las.validate_errors

Check for errors

Check for only critical errors
lasfile.error_check(las)
Check for all errors
lasfile.error_check(las, critical_only=False)
LASSection objects can also be passed to error_check
lasfile.error_check(las.well)

License

MIT

Metadata

Release files for lasfile 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lasfile 0.2.5
File Size Uploaded
lasfile-0.2.5.tar.gz 25.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lasfile 0.2.5
File Interpreter ABI Platform
lasfile-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 49.1 kB

Release files / lasfile-0.2.5.tar.gz

Download URL lasfile-0.2.5.tar.gz
Size 25.1 kB
Tags Source
SHA-256 checksum
How to use checksums
77f7e974be2ed7cf2c38c2c8e8b6aea766a1ecb493a66322eee1e949b90c2217
BLAKE2b-256 checksum
How to use checksums
e3ca64b1f0e369869c04dd3869c74a575d4a9ebddcaa5164d816d073a95eebc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / lasfile-0.2.5-py3-none-any.whl

Download URL lasfile-0.2.5-py3-none-any.whl
Size 24.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bba53775578dff47baadbe49bf56e9f07090e65f5b83346b1a7c6b45a338a354
BLAKE2b-256 checksum
How to use checksums
91d055bd0941d174e584631ea8950a0ad76cdf6575f21ae70b79216ccfa71e15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.47

2 release files

0.1.45

2 release files

0.1.44

2 release files

0.1.43

2 release files

0.1.42

2 release files

0.1.41

2 release files

0.1.40

2 release files

0.1.39

2 release files

0.1.38

2 release files

0.1.37

2 release files

0.1.36

2 release files

0.1.35

2 release files

0.1.34

2 release files

0.1.33

2 release files

0.1.32

2 release files

0.1.31

2 release files

0.1.25

2 release files

0.1.24

2 release files

0.1.23

2 release files

0.1.22

2 release files

0.1.21

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page