OpendTect-6_4  6.4
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Static Private Member Functions | Private Attributes | Friends | List of all members
SurveyInfo Class Reference

Holds survey general information. More...

Inheritance diagram for SurveyInfo:
[legend]

Public Types

enum  Unit { Second, Meter, Feet }
 
enum  Pol2D { No2D =0, Both2DAnd3D =1, Only2D =2 }
 

Public Member Functions

 ~SurveyInfo ()
 
bool has2D () const
 
bool has3D () const
 
StepInterval< int > inlRange (bool work) const
 
StepInterval< int > crlRange (bool work) const
 
const StepInterval< float > & zRange (bool work) const
 
int inlStep () const
 
int crlStep () const
 
float zStep () const
 
float inlDistance () const
 distance for one increment More...
 
float crlDistance () const
 
float getArea (const Interval< int > &inl, const Interval< int > &crl) const
 returns m2 More...
 
float getArea (bool work) const
 returns m2 More...
 
Coord3 oneStepTranslation (const Coord3 &planenormal) const
 
const TrcKeyZSamplingsampling (bool work) const
 
Coord transform (const BinID &b) const
 
BinID transform (const Coord &) const
 
bool xyInFeet () const
 
const char * getXYUnitString (bool withparens=true) const
 
uiString getUiXYUnitString (bool abbrviated=true, bool withparens=true) const
 
const ZDomain::DefzDomain () const
 
bool depthsInFeet () const
 
float showZ2UserFactor () const
 
bool zIsTime () const
 Legacy, don't use. Use zDomain().isTime() More...
 
bool zInMeter () const
 Legacy, don't use. More...
 
bool zInFeet () const
 
const char * getZUnitString (bool withparens=true) const
 <Legacy, don't use More...
 
const uiString getUiZUnitString (bool withparens=true) const
 
Unit xyUnit () const
 Legacy, don't use. More...
 
Unit zUnit () const
 Legacy, don't use. More...
 
Coord minCoord (bool work) const
 
Coord maxCoord (bool work) const
 
bool isInside (const BinID &, bool work) const
 
bool isReasonable (const BinID &) const
 Checks if in or near survey. More...
 
bool isReasonable (const Coord &) const
 Checks if in or near survey. More...
 
Interval< int > reasonableRange (bool inl) const
 
int maxNrTraces (bool work) const
 
void checkInlRange (Interval< int > &, bool work) const
 Makes sure range is inside. More...
 
void checkCrlRange (Interval< int > &, bool work) const
 Makes sure range is inside. More...
 
void checkZRange (Interval< float > &, bool work) const
 Makes sure range is inside. More...
 
bool includes (const BinID &, const float, bool work) const
 Returns true when pos is inside survey-range. More...
 
void snap (BinID &, const BinID &dir=BinID(0, 0)) const
 dir = 0 : auto; -1 round downward, 1 round upward More...
 
void snapStep (BinID &, const BinID &dir=BinID(0, 0)) const
 see snap() for direction More...
 
void snapZ (float &, int direction=0) const
 see snap() for direction More...
 
float seismicReferenceDatum () const
 
void setSeismicReferenceDatum (float d)
 
const IOParpars () const
 
void putZDomain (IOPar &) const
 
RefMan< Survey::Geometry3Dget3DGeometry (bool work) const
 
RefMan< Coords::CoordSystemgetCoordSystem ()
 
ConstRefMan< Coords::CoordSystemgetCoordSystem () const
 
void setWorkRange (const TrcKeyZSampling &)
 
const Pos::IdxPair2CoordbinID2Coord () const
 
void get3Pts (Coord c[3], BinID b[2], int &xline) const
 
const LatLong2Coordlatlong2Coord () const
 
bool isClockWise () const
 Don't use. Will be removed. More...
 
bool isRightHandSystem () const
 
float angleXInl () const
 
float angleXCrl () const
 
void setXYInFeet (bool yn=true)
 
void setDepthInFeet (bool yn=true)
 
void setZUnit (bool istime, bool infeet=false)
 
float zScale () const
 
BufferString getDirName () const
 
BufferString getDataDirName () const
 
void updateDirName ()
 May be used after setName() More...
 
Pol2D survDataType () const
 
void setSurvDataType (Pol2D typ)
 
const char * comment () const
 
BufferString sipName () const
 
void setSipName (BufferString sipnm)
 
void setComment (const char *s)
 
 SurveyInfo (const SurveyInfo &)
 
SurveyInfooperator= (const SurveyInfo &)
 
Pos::IdxPair2CoordgetBinID2Coord () const
 
LatLong2CoordgetLatlong2Coord () const
 
IOPargetPars () const
 
bool write (const char *basedir=0) const
 Write to .survey file. More...
 
void savePars (const char *basedir=0) const
 Write to .defs file. More...
 
void setRange (const TrcKeyZSampling &, bool)
 
const char * set3Pts (const Coord c[3], const BinID b[2], int xline)
 
void gen3Pts ()
 
bool setCoordSystem (Coords::CoordSystem *)
 
void readSavedCoordSystem () const
 Useful after loading plugins. More...
 
void update3DGeometry ()
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=0)
 
 NamedObject (const NamedObject *linkedto)
 
 NamedObject (const NamedObject &)
 
virtual ~NamedObject ()
 
void setLinkedTo (NamedObject *)
 
bool operator== (const NamedObject &oth) const
 
virtual const OD::Stringname () const
 
virtual const OD::StringannotName () const
 
virtual void setName (const char *)
 
void setCleanName (const char *)
 cleans string first More...
 
void deleteNotify (const CallBack &)
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (NotifierAccess &, const CallBack &, bool onlyifnew=false)
 
bool attachCB (NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false)
 
void detachCB (NotifierAccess &, const CallBack &)
 
void detachCB (NotifierAccess *notif, const CallBack &cb)
 
bool isNotifierAttached (NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 

Static Public Member Functions

static float defaultXYtoZScale (Unit, Unit)
 
static const char * sKeyInlRange ()
 
static const char * sKeyCrlRange ()
 
static const char * sKeyXRange ()
 
static const char * sKeyYRange ()
 
static const char * sKeyZRange ()
 
static const char * sKeyXYInFt ()
 
static const char * sKeyDpthInFt ()
 Not used by SI, just a UI default. More...
 
static const char * sKeySurvDataType ()
 
static const char * sKeySeismicRefDatum ()
 
static const char * sKeySetupFileName ()
 
static const char * sKeyBasicSurveyName ()
 
static const EnumDefImpl< Pol2D > & Pol2DDef ()
 
static const char ** Pol2DNames ()
 
static bool parseEnumPol2D (const char *, Pol2D &)
 
static bool parseEnum (const char *, Pol2D &)
 
static bool parseEnum (const IOPar &, const char *, Pol2D &)
 
static Pol2D parseEnumPol2D (const char *)
 
static const char * toString (Pol2D)
 
static uiString toUiString (Pol2D)
 
static const char * getPol2DString (Pol2D)
 
static SurveyInforead (const char *survdir)
 
static SurveyInforead (const char *path, bool pathisfile)
 
static const char * curSurveyName ()
 
static void pushSI (SurveyInfo *)
 
static SurveyInfopopSI ()
 
static void deleteInstance ()
 

Public Attributes

Notifier< SurveyInfoworkRangeChg
 

Protected Member Functions

 SurveyInfo ()
 
void handleLineRead (const BufferString &, const char *)
 
bool wrapUpRead ()
 
void writeSpecLines (ascostream &) const
 
void setTr (Pos::IdxPair2Coord::DirTransform &, const char *)
 
void putTr (const Pos::IdxPair2Coord::DirTransform &, ascostream &, const char *) const
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers ()
 Call from the destructor of your inherited object. More...
 

Protected Attributes

BufferString datadir_
 
BufferString dirname_
 
ZDomain::Defzdef_
 
bool xyinfeet_
 
bool depthsinfeet_
 
TrcKeyZSamplingtkzs_
 
TrcKeyZSamplingwcs_
 
float seisrefdatum_
 
IOParpars_
 
RefMan< Coords::CoordSystemcoordsystem_
 
Threads::AtomicPointer< Survey::Geometry3Ds3dgeom_
 
Threads::AtomicPointer< Survey::Geometry3Dwork_s3dgeom_
 
Pos::IdxPair2Coord b2c_
 
LatLong2Coordll2c_
 
BinID set3binids_ [3]
 
Coord set3coords_ [3]
 
Pol2D survdatatype_
 
bool survdatatypeknown_
 
BufferString comment_
 
BufferString sipnm_
 
- Protected Attributes inherited from NamedObject
BufferStringname_
 
NamedObjectlinkedto_
 
CallBackSetdelnotify_
 

Static Protected Attributes

static const char * Pol2DKeys_ []
 
static ConstPtrMan< EnumDefImpl< Pol2D > > Pol2DDefinition_
 

Static Private Member Functions

static void setSurveyName (const char *)
 
static const char * surveyFileName ()
 

Private Attributes

Pos::IdxPair2Coord::DirTransform rdxtr_
 
Pos::IdxPair2Coord::DirTransform rdytr_
 

Friends

class IOMan
 
class uiSurvey
 
class uiSurveyMap
 
class uiSurveyInfoEditor
 
const SurveyInfoSI ()
 

Detailed Description

Holds survey general information.

The surveyinfo is the primary source for ranges and steps.It also provides the transformation between inline/xline <-> coordinates and lat/long estimates

Note: the Z range step is only a default. It should not be used further because different cubes/lines have different sample rates.

The ranges are defined for two cubes: the entire survey, and a 'working area'. Normally, you'll want to have the working area.

If you are an expert, and you feel you need more 'power', you may want to look at the bottom part of the class too for some more public functions.

Member Enumeration Documentation

Enumerator
No2D 
Both2DAnd3D 
Only2D 
Enumerator
Second 
Meter 
Feet 

Constructor & Destructor Documentation

SurveyInfo::~SurveyInfo ( )
SurveyInfo::SurveyInfo ( )
protected
SurveyInfo::SurveyInfo ( const SurveyInfo )

Member Function Documentation

float SurveyInfo::angleXCrl ( ) const

It's the angle between the X-axis (East) and a Crossline

float SurveyInfo::angleXInl ( ) const

It's the angle between the X-axis (East) and an Inline

const Pos::IdxPair2Coord& SurveyInfo::binID2Coord ( ) const
inline
void SurveyInfo::checkCrlRange ( Interval< int > &  ,
bool  work 
) const

Makes sure range is inside.

void SurveyInfo::checkInlRange ( Interval< int > &  ,
bool  work 
) const

Makes sure range is inside.

void SurveyInfo::checkZRange ( Interval< float > &  ,
bool  work 
) const

Makes sure range is inside.

const char* SurveyInfo::comment ( ) const
inline
float SurveyInfo::crlDistance ( ) const
StepInterval<int> SurveyInfo::crlRange ( bool  work) const
int SurveyInfo::crlStep ( ) const
static const char* SurveyInfo::curSurveyName ( )
static
static float SurveyInfo::defaultXYtoZScale ( Unit  ,
Unit   
)
static

Gives a ballpark figure of how to scale XY to make it comparable to Z.

static void SurveyInfo::deleteInstance ( )
inlinestatic
bool SurveyInfo::depthsInFeet ( ) const
inline
void SurveyInfo::gen3Pts ( )
RefMan<Survey::Geometry3D> SurveyInfo::get3DGeometry ( bool  work) const
void SurveyInfo::get3Pts ( Coord  c[3],
BinID  b[2],
int &  xline 
) const
float SurveyInfo::getArea ( const Interval< int > &  inl,
const Interval< int > &  crl 
) const

returns m2

float SurveyInfo::getArea ( bool  work) const

returns m2

Pos::IdxPair2Coord& SurveyInfo::getBinID2Coord ( ) const
inline
RefMan<Coords::CoordSystem> SurveyInfo::getCoordSystem ( )
ConstRefMan<Coords::CoordSystem> SurveyInfo::getCoordSystem ( ) const
BufferString SurveyInfo::getDataDirName ( ) const
inline
BufferString SurveyInfo::getDirName ( ) const
inline
LatLong2Coord& SurveyInfo::getLatlong2Coord ( ) const
inline
IOPar& SurveyInfo::getPars ( ) const
inline
static const char* SurveyInfo::getPol2DString ( Pol2D  )
static
uiString SurveyInfo::getUiXYUnitString ( bool  abbrviated = true,
bool  withparens = true 
) const
const uiString SurveyInfo::getUiZUnitString ( bool  withparens = true) const
inline
const char* SurveyInfo::getXYUnitString ( bool  withparens = true) const
const char* SurveyInfo::getZUnitString ( bool  withparens = true) const
inline

<Legacy, don't use

void SurveyInfo::handleLineRead ( const BufferString ,
const char *   
)
protected
bool SurveyInfo::has2D ( ) const
bool SurveyInfo::has3D ( ) const
bool SurveyInfo::includes ( const BinID ,
const float  ,
bool  work 
) const

Returns true when pos is inside survey-range.

float SurveyInfo::inlDistance ( ) const

distance for one increment

StepInterval<int> SurveyInfo::inlRange ( bool  work) const
int SurveyInfo::inlStep ( ) const
bool SurveyInfo::isClockWise ( ) const
inline

Don't use. Will be removed.

bool SurveyInfo::isInside ( const BinID ,
bool  work 
) const
bool SurveyInfo::isReasonable ( const BinID ) const

Checks if in or near survey.

bool SurveyInfo::isReasonable ( const Coord ) const

Checks if in or near survey.

bool SurveyInfo::isRightHandSystem ( ) const

Orientation is determined by rotating the inline axis to the crossline axis.

const LatLong2Coord& SurveyInfo::latlong2Coord ( ) const
inline
Coord SurveyInfo::maxCoord ( bool  work) const
int SurveyInfo::maxNrTraces ( bool  work) const
Coord SurveyInfo::minCoord ( bool  work) const
Coord3 SurveyInfo::oneStepTranslation ( const Coord3 planenormal) const
SurveyInfo& SurveyInfo::operator= ( const SurveyInfo )
const IOPar& SurveyInfo::pars ( ) const
inline
static bool SurveyInfo::parseEnum ( const char *  ,
Pol2D  
)
static
static bool SurveyInfo::parseEnum ( const IOPar ,
const char *  ,
Pol2D  
)
static
static bool SurveyInfo::parseEnumPol2D ( const char *  ,
Pol2D  
)
static
static Pol2D SurveyInfo::parseEnumPol2D ( const char *  )
static
static const EnumDefImpl< Pol2D >& SurveyInfo::Pol2DDef ( )
static
static const char** SurveyInfo::Pol2DNames ( )
static
static SurveyInfo* SurveyInfo::popSI ( )
static
static void SurveyInfo::pushSI ( SurveyInfo )
static
void SurveyInfo::putTr ( const Pos::IdxPair2Coord::DirTransform ,
ascostream ,
const char *   
) const
protected
void SurveyInfo::putZDomain ( IOPar ) const
static SurveyInfo* SurveyInfo::read ( const char *  survdir)
static
static SurveyInfo* SurveyInfo::read ( const char *  path,
bool  pathisfile 
)
static
void SurveyInfo::readSavedCoordSystem ( ) const

Useful after loading plugins.

Interval<int> SurveyInfo::reasonableRange ( bool  inl) const
const TrcKeyZSampling& SurveyInfo::sampling ( bool  work) const
inline
void SurveyInfo::savePars ( const char *  basedir = 0) const

Write to .defs file.

float SurveyInfo::seismicReferenceDatum ( ) const
inline

In depth units (m or ft), positive upward from sea level. Always in meters for time surveys

const char* SurveyInfo::set3Pts ( const Coord  c[3],
const BinID  b[2],
int  xline 
)
void SurveyInfo::setComment ( const char *  s)
inline
bool SurveyInfo::setCoordSystem ( Coords::CoordSystem )
void SurveyInfo::setDepthInFeet ( bool  yn = true)
inline
void SurveyInfo::setRange ( const TrcKeyZSampling ,
bool   
)
void SurveyInfo::setSeismicReferenceDatum ( float  d)
inline
void SurveyInfo::setSipName ( BufferString  sipnm)
inline
void SurveyInfo::setSurvDataType ( Pol2D  typ)
inline
static void SurveyInfo::setSurveyName ( const char *  )
staticprivate
void SurveyInfo::setTr ( Pos::IdxPair2Coord::DirTransform ,
const char *   
)
protected
void SurveyInfo::setWorkRange ( const TrcKeyZSampling )
void SurveyInfo::setXYInFeet ( bool  yn = true)
inline
void SurveyInfo::setZUnit ( bool  istime,
bool  infeet = false 
)
float SurveyInfo::showZ2UserFactor ( ) const
inline
BufferString SurveyInfo::sipName ( ) const
inline
static const char* SurveyInfo::sKeyBasicSurveyName ( )
inlinestatic
static const char* SurveyInfo::sKeyCrlRange ( )
static
static const char* SurveyInfo::sKeyDpthInFt ( )
static

Not used by SI, just a UI default.

static const char* SurveyInfo::sKeyInlRange ( )
static
static const char* SurveyInfo::sKeySeismicRefDatum ( )
static
static const char* SurveyInfo::sKeySetupFileName ( )
inlinestatic
static const char* SurveyInfo::sKeySurvDataType ( )
static
static const char* SurveyInfo::sKeyXRange ( )
static
static const char* SurveyInfo::sKeyXYInFt ( )
static
static const char* SurveyInfo::sKeyYRange ( )
static
static const char* SurveyInfo::sKeyZRange ( )
static
void SurveyInfo::snap ( BinID ,
const BinID dir = BinID(0, 0) 
) const

dir = 0 : auto; -1 round downward, 1 round upward

void SurveyInfo::snapStep ( BinID ,
const BinID dir = BinID(0, 0) 
) const

see snap() for direction

void SurveyInfo::snapZ ( float &  ,
int  direction = 0 
) const

see snap() for direction

Pol2D SurveyInfo::survDataType ( ) const
inline
static const char* SurveyInfo::surveyFileName ( )
staticprivate
static const char* SurveyInfo::toString ( Pol2D  )
static
static uiString SurveyInfo::toUiString ( Pol2D  )
static
Coord SurveyInfo::transform ( const BinID b) const
BinID SurveyInfo::transform ( const Coord ) const
Note
BinID will be snapped using work step.
void SurveyInfo::update3DGeometry ( )
void SurveyInfo::updateDirName ( )

May be used after setName()

bool SurveyInfo::wrapUpRead ( )
protected
bool SurveyInfo::write ( const char *  basedir = 0) const

Write to .survey file.

void SurveyInfo::writeSpecLines ( ascostream ) const
protected
bool SurveyInfo::xyInFeet ( ) const
Unit SurveyInfo::xyUnit ( ) const

Legacy, don't use.

const ZDomain::Def& SurveyInfo::zDomain ( ) const
bool SurveyInfo::zInFeet ( ) const
inline
bool SurveyInfo::zInMeter ( ) const
inline

Legacy, don't use.

bool SurveyInfo::zIsTime ( ) const

Legacy, don't use. Use zDomain().isTime()

const StepInterval<float>& SurveyInfo::zRange ( bool  work) const
float SurveyInfo::zScale ( ) const

Gives a ballpark figure of how to scale Z to make it comparable to XY.

float SurveyInfo::zStep ( ) const
Unit SurveyInfo::zUnit ( ) const

Legacy, don't use.

Friends And Related Function Documentation

friend class IOMan
friend
const SurveyInfo& SI ( )
friend
friend class uiSurvey
friend
friend class uiSurveyInfoEditor
friend
friend class uiSurveyMap
friend

Member Data Documentation

Pos::IdxPair2Coord SurveyInfo::b2c_
protected
BufferString SurveyInfo::comment_
protected
RefMan<Coords::CoordSystem> SurveyInfo::coordsystem_
protected
BufferString SurveyInfo::datadir_
protected
bool SurveyInfo::depthsinfeet_
protected
BufferString SurveyInfo::dirname_
protected
LatLong2Coord& SurveyInfo::ll2c_
protected
IOPar& SurveyInfo::pars_
protected
ConstPtrMan<EnumDefImpl< Pol2D > > SurveyInfo::Pol2DDefinition_
staticprotected
const char* SurveyInfo::Pol2DKeys_[]
staticprotected
Pos::IdxPair2Coord::DirTransform SurveyInfo::rdxtr_
private
Pos::IdxPair2Coord::DirTransform SurveyInfo::rdytr_
private
Threads::AtomicPointer<Survey::Geometry3D> SurveyInfo::s3dgeom_
mutableprotected
float SurveyInfo::seisrefdatum_
protected
BinID SurveyInfo::set3binids_[3]
protected
Coord SurveyInfo::set3coords_[3]
protected
BufferString SurveyInfo::sipnm_
protected
Pol2D SurveyInfo::survdatatype_
protected
bool SurveyInfo::survdatatypeknown_
protected
TrcKeyZSampling& SurveyInfo::tkzs_
protected
TrcKeyZSampling& SurveyInfo::wcs_
protected
Threads::AtomicPointer<Survey::Geometry3D> SurveyInfo::work_s3dgeom_
mutableprotected
Notifier<SurveyInfo> SurveyInfo::workRangeChg
bool SurveyInfo::xyinfeet_
protected
ZDomain::Def& SurveyInfo::zdef_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019