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.

Files for las-converter, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size las_converter-0.3-py3-none-any.whl (5.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size las-converter-0.3.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page