Working with Well Data

A well data object is used to represent the well position and its trajectory in IMapWindow and IWindow3D. It can also be overlayed on top of an ISeismicLayer in IXSectionWindow. To visualize the log curves in tracks, you can load it inside of the IWellLogWindow.

Note: You will need to include WellData to your Module Dependencies list.

Creating a Well data object from a file

We support well data files that have the extension ".las" - both LAS 2.0 and LAS 3.0 versions. In LAS 2.0, the well trajectory information is found in a corresponding ".dev" file. The LAS 3.0 has well trajectory ( Inclinometry_Data) stored inside of the ".las" file .

A well data file can be loaded as follows:

    import com.interactive.intviewerapi.data.IData;
    import com.interactive.intviewerapi.data.well.IWellData;
    import com.interactive.intviewerapi.util.DialogManager;
    ...
        IWellData wellData = null;
        try {
            wellData = IData.factory.createNewInstance("/data/WELL/WellA.las", IWellData.class);
        } catch (Exception ex) {
            DialogManager.getDefault().showMessageDialog("Error loading Well data file WellA.las.",
                    "Error Loading Well Data File", DialogManager.ERROR);
            return;
        }

Loading Well Data from a file chooser

To select one dataset:

import com.interactive.intviewerapi.data.ISingleDataChooser;

   // get the chooser for well data type
   ISingleDataChooser<IWellData> singleChooser = ISingleDataChooser.Factory.createNewInstance(IDataChooser.WELL);
   // popup the chooser dialog
   int rc = singleChooser.setDataChooserVisible(true);
   if (rc == JFileChooser.APPROVE_OPTION) {
      IWellData wellData = singleChooser.getSelectedData();
   }

To select multiple datasets:

import com.interactive.intviewerapi.data.IMultipleDataChooser;

   // get the file chooser for well data type
   IMultipleDataChooser<IWellData> multipleChooser = IMultipleDataChooser.Factory.createNewInstance(IDataChooser.WELL);
   // popup the chooser dialog
   int rc = multipleChooser.setDataChooserVisible(true);
   if (rc == JFileChooser.APPROVE_OPTION) {
      for (IWellData wellData : multipleChooser.getSelectedData()) {
      }
   }

Getting information about the data keys

Range keys provide information about how to access the well data. They can be accessed as follows:

IWellData wellData = ...
List<IKeyRange> keyRangeList = wellData.getDataRange();

The key names of a well are typically X, Y, MD, and Time.

Retrieving all markers

IWellData wellData = ...
IMarker[] markers = wellData.getAllMarkers();

Retrieving all curves (ex: DEPT, SW)

IWellData wellData = ...
ILogCurve[] logCurves = wellData.getAllCurves();
To only retrieve log curve names, the following call will be more efficient:
String[] logCurveNames = wellData.getAllCurveNames();

Retrieving all deviations (ex: MD, TVD)

IWellData wellData = ...
ILogCurve[] deviationCurves = wellData.getAllDeviations();

To only retrieve deviation curve names, the following call will be more efficient:

String[] deviationCurveNames = wellData.getAllDeviationNames();

Retrieving all log arrays

IWellData wellData = ...
ILogArray[] logArrays = wellData.getAllLogArrays();

To only retrieve log array names, the following call will be more efficient:

String[] logArrays = wellData.getAllLogArrayNames();

Retrieving the trajectory

IWellData wellData = ...
ITrajectory trajectory = trajectory.getTrajectory();

A trajectory is essentially a collection of MD, TVD, X and Y values. To read all trajectory points, use this template:

ITrajectoryReader reader= trajectory.select();
for (int i=0;i<reader.getgetNumberOfValues();i++) {
    x=reader.getXCoordinate(i);
    y=reader.getYCoordinate(i);
    md=reader.getMD(i);
    tvd=reader.getTVD(i);
}

Discovering the vertical unit of a well dataset

IWellData wellData = ...
IUnit xUnit = wellData.getZUnit()

Unit handling is explained in this section