Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write las ascii object to memory as JSON #504

Open
s0rhe1m opened this issue Dec 15, 2021 · 2 comments
Open

Write las ascii object to memory as JSON #504

s0rhe1m opened this issue Dec 15, 2021 · 2 comments

Comments

@s0rhe1m
Copy link

s0rhe1m commented Dec 15, 2021

Is your feature request related to a problem? Please describe.
I need to send my edited las file to an API, but I dont want to send the lasio object. I want to send the LAS ascii object.

Describe the solution you'd like
Ability to write ascii to memory using lasio.

Describe alternatives you've considered
writing the file to local disk and reading it.

Additional context
OSDU

@dcslagel
Copy link
Collaborator

Lasio can write the Lasio object out to the text formats: csv, and json.

csv

LASFile.to_csv(file_ref, mnemonics=True, units=True, units_loc='line', **kwargs)

json

LASFile.to_json()

or

json.dumps(LASFile, cls=las.JSONEncoder)

@kinverarity1
Copy link
Owner

At the moment the only way to serialise the complete LASFile lasio object is to write it back to LAS, so I have tagged this as an enhancement.

@kinverarity1 kinverarity1 changed the title Write las ascii object to memory Write las ascii object to memory as JSON May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants