Skip to main content

Converter LAS file to python dictionary and json file

Project description

LAS 2.0 Reader and Converter to JSON

This package useful for reading and converting the LAS file to python dict and json.

LAS (Log ASCII Standard) is a structured ASCII file containing log curve data and header information. For more detail.

Example LAS File

~VERSION INFORMATION
 VERS.                 2.0 :   CWLS LOG ASCII STANDARD - VERSION 2.0
 WRAP.                  NO :   SINGLE LINE PER DEPTH STEP
 CREA.                 1/30/2018 12:24:47 PM

see full LAS file here.

Installation

pip install las-converter

How to use

from LAS import LasConverter

c = LasConverter() # create object
# set file or stream
log_in_dict = c.set_file("file.las").get_dict()
# or
log_int_json = c.set_file("file.las").get_json()  # return json and make new file outfile.json

Server app (Flask)

# server app for handling upload
from flask import request
from LAS import LasConverter

@app.route('/upload', methods=['GET', 'POST'])
def upload_file():
    if request.method == "POST":
        f = request.files['file']
        stream = f.stream.readlines()


        # code for Las Converter
        c = LasConverter()
        log_in_dict = c.set_stream(stream).get_dict()
        # or
        log_in_json = c.set_stream(stream).get_json()
        # or get only assci/data
        data = log_in_json = c.set_stream(stream).data

Contributors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

las-converter-0.3.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

las_converter-0.3-py3-none-any.whl (5.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page