odbind.survey

Module Contents

Classes

Survey

A class for an OpendTect survey/project.

_SurveyObject

Base class for OpendTect survey objects - not useful on its own

class odbind.survey.Survey(survey_name: str, basedir: str = None)

Bases: object

A class for an OpendTect survey/project.

property handle: ctypes.c_void_p

Return the ctypes pointer to the underlying C/C++ Survey object .

property isok: bool

Return the current status of the underlying C/C++ Survey object.

property errmsg: str

Return the current error message string of the underlying C/C++ Survey object.

property has2d: bool

bool: True if the survey contains 2D data, False otherwise (readonly)

property has3d: bool

bool: True if the survey contains 3D data, False otherwise (readonly)

property survey_type: str

str: Survey type: one of 2D, 3D or 2D3D (readonly)

property zrange: list[float]

list[float]: Z range in survey definition (readonly)

property inlrange: list[int]

list[int]: inline range in survey definition (readonly)

property crlrange: list[int]

list[int]: crossline range in survey definition (readonly)

_new
_del
_errmsg
_isok
_bin
_bincoords
_coords
_crlrange
_feature
_features
_has2d
_has3d
_hasobject
_info
_infos
_inlrange
_names
_path
_type
_zrange
__del__()
bin(x: float, y: float) tuple[int, int]

Return the nearest inline and crossline location to the given X and Y coordinates.

Parameters

xfloat

x or easting in the survey’s coordinate system

yfloat

y or northing in the survey’s coordinate system

Returns

tuple[int, int] : The nearest inline and crossline location to the given X and Y coordinates

bincoords(x: float, y: float) tuple[float, float]

Return the decimal inline and crossline location of the given X and Y coordinates.

Parameters

xfloat

x or easting in the survey’s coordinate system

yfloat

y or northing in the survey’s coordinate system

Returns

tuple[float, float] : The decimal inline and crossline location equivalent to the given X and Y coordinates

coords(iline: int, xline: int) tuple[float, float]

Return the X and Y coordinates corresponding to the given inline and crossline.

Parameters

ilineint

Inline number

xlineintfloat

Crossline number

Returns

tuple[float, float] : The X and Y coordinates equivalent to the given inline and crossline

feature() dict

Return a GeoJSON feature for the survey

info() dict

Return basic information for the OpendTect survey.

Returns

dict

static names(basedir: str = None) list[str]

Return the names of all surveys

Parameters

basedirstr=None

(Optional) an OpendTect data directory/folder to use, defaults to location set in user’s OpendTect settings

Returns

list[str]

static infos(fornms: list = [], basedir: str = None) dict

Return basic information for all or a subset of surveys

Parameters

fornmslist[str]=[]

(Optional) a list of survey names to use. For an empty list information for all surveys is provided.

basedirstr=None

(Optional) an OpendTect data directory/folder to use, defaults to location set in user’s OpendTect settings

Returns

dict

static infos_dataframe(fornms: list = [], basedir: str = None)

Return basic information for all or a subset of surveys as a Pandas DataFrame.

Parameters

fornmslist[str]=[]

(Optional) a list of survey names to use. For an empty list information for all surveys is provided.

basedirstr=None

(Optional) an OpendTect data directory/folder to use, defaults to location set in user’s OpendTect settings

Returns

Pandas DataFrame

static features(fornms: list = [], basedir: str = None) str

Return a GeoJSON Feature Collection with the outlines and basic information for all or a subset of surveys.

Parameters

fornmslist[str]=[]

(Optional) a list of survey names to use. For an empty list information for all surveys is provided.

basedirstr=None

(Optional) an OpendTect data directory/folder to use, defaults to location set in user’s OpendTect settings

Returns

dict

class odbind.survey._SurveyObject(survey: Survey, name: str)

Bases: object

Base class for OpendTect survey objects - not useful on its own

property survey: Survey

Return the Survey object that this item is from.

property handle: ctypes.c_void_p

Return the ctypes pointer to the underlying C/C++ object .

property isok: bool

Return the current status of the underlying C/C++ object.

property errmsg: str

Return the current error message string of the underlying C/C++ object.

property zistime: bool
classmethod _initbasebindings(bindnm)
__del__()
feature() dict

Return a GeoJSON feature for the object

classmethod features(survey: Survey, fornms: list = []) str

Return a GeoJSON Feature Collection for all or a subset of objects in the given survey.

Parameters

surveySurvey

An OpendTect survey object

fornmslist[str]

A list of object names to use, an empty list will give information for all objects.

Returns

dict

info() dict

Return basic information for this object.

Returns

dict

wrapindex(i)
classmethod infos(survey: Survey, fornms: list = []) dict

Return basic information for all or a subset of objects in the given survey.

Parameters

surveySurvey

An OpendTect survey object

fornmslist[str]

A list of object names to use, an empty list will give information for all objects.

Returns

dict

classmethod infos_dataframe(survey: Survey, fornms: list = []) dict

Return basic information for all or a subset of objects in the given survey as a Pandas DataFrame.

Parameters

surveySurvey

An OpendTect survey object

fornmslist[str]

A list of object names to use, an empty list will give information for all objects.

Returns

dict

classmethod names(survey: Survey) list[str]

Return the names of this object type in the given survey

Parameters

surveySurvey

An OpendTect survey object

Returns

list[str]

classmethod delete(survey: Survey, nms: list[str])

Removes the listed objects from the given survey.

Parameters

surveySurvey

An OpendTect survey object

nmslist[str]

A list of object names to remove.