Log I/O is a library for accessing well log files
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
META-INF
lib
src/no/petroware/logio Force UTF-8 Dec 5, 2018
.gitignore
LICENSE
README.md

README.md

Log I/O - Library for accessing well log files

Log I/O is a library for reading and writing well log files.

As of Q4/2018 Log I/O supports DLIS, LIS, LAS 2.0, LAS 3.0, BIT, XTF, ASC, SPWLA, CSV, and JSON Well Log Format. Log I/O wraps the complexity of these formats in a clean, complete, well documented, efficient and extremely simple to use programming API.

The open source version of Log I/O contains the Java accessor for the JSON Well Log Format.

Log I/O web page: https://petroware.no/logio.html

Setup

Capture the Log I/O code to local disk by:

$ git clone https://github.com/Petroware/LogIo.git

Dependencies

The JSON Well Log Format accessor depends on the JSON API specification and an implementation of this:

lib/javax.json-api-1.1.3.jar
lib/javax.json-1.1.3.jar

API Documentation

Java: https://petroware.no/logio/javadoc/index.html

.Net: https://petroware.no/logio/doxygen/index.html

Programming examples

Read

Example for reading a JSON Well Log file:

import no.petroware.logio.json.JsonFile;
import no.petroware.logio.json.JsonReader;

:

// Create a JSON Well Log reader and read to memory
JsonReader jsonReader = new JsonReader(new File("path/to/file.JSON"));
List<JsonFile> jsonFiles = jsonReader.read(true, false, null);

From this point the JsonFile instance(s) can be navigated to access curves and metadata.

If files are larger than physical memory it is possible to process the content in a streaming manner by adding a JsonDataListener to the read() call.

Validate

Example for validating a JSON Well Log file:

import no.petroware.logio.json.JsonValidator;

:

JsonValidator jsonValidator = JsonValidaor.getInstance();
List<JsonValidator.Message> messages = jsonValidator.validate(new File("path/to/file.JSON"));

The messages are of different severity and points to potential problems at specific locations in the input file.

Write

Example for creating a JSON Well Log file from scratch:

import no.petroware.logio.json.JsonCurve;
import no.petroware.logio.json.JsonFile;
import no.petroware.logio.json.JsonWriter;

:

// Create an empty JSON file instance
JsonFile jsonFile = new JsonFile();

// Populate with metadata
jsonFile.setName("EcoScope Data");
jsonFile.setWell("35/12-6S");
jsonFile.setField("Ekofisk");
:

// Create curves
JsonCurve c1 = new JsonCurve("MD", "Measured depth", "length", "m", Double.class, 1);
jsonFile.addCurve(c1);

JsonCurve c2 = new JsonCurve("RES", "Resistivity", "electrical resistivity", "ohm.m", Double.class, 1);
jsonFile.addCurve(c2);

// Add curve data
c1.addValue(1000.0);
c1.addValue(1001.0);
c1.addValue(1002.0);
:
c1.addValue(1349.0);

c2.addValue(127.3);
c2.addValue(92.16);
c2.addValue(null);
:
c2.addValue(118.871);

// Specify metadata for index
jsonFile.setStartIndex(jsonFile.getActualStartIndex());
jsonFile.setEndIndex(jsonFile.getActualEndIndex());
jsonFile.setStep(jsonFile.getActualStep());

// Write to file, human readable with 2 space indentation
JsonWriter jsonWriter = new JsonWriter(new File("path/to/file.json", true, 2);
jsonWriter.write(jsonFile);
jsonWriter.close();

This will produce the following file:

{
  "log": {
    "metadata": {
      "name": "EcoScope Data" ,
      "well": "35/12-6S",
      "field": "Ekofisk",
      "startIndex": 1000.0,
      "endIndex": 1349.0,
      "step": 1.0
    },
    "curves": [
      {
        "name": "MD",
        "description": "Measured depth",
        "quantity": "length",
        "unit": "m",
        "valueType": "float",
        "dimensions": 1
      },
      {
        "name": "RES",
        "description": "Resistivity",
        "quantity": "electrical resistivity",
        "unit": "ohm.m",
        "valueType": "float",
        "dimensions": 1
      }
    ]
    "data": [
      [1000.0, 127.300],
      [1001.0,  92.160],
      [1002.0,    null],
      :
      :
      [1349.0, 112.871]
    ]
  }
}

About Petroware

Petroware AS is a software company within the data management, data analytics, petrophysics, geology and reservoir engineering domains.

Petroware creates highly advanced software components and end-user products that acts as a research platform within software architecture and scalability, system design, parallelism and multi-threading, user experience (UX) and usability analysis as well as development methodologies and techniques.

Petroware AS
Stavanger - Norway
https://petroware.no
info@petroware.no