Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | Friends

SurveyInfo Class Reference

Holds survey general information. More...

Inheritance diagram for SurveyInfo:
NamedObject CallBacker

List of all members.

Public Types

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

Public Member Functions

 ~SurveyInfo ()
bool isValid () const
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
float crlDistance () const
float computeArea (const Interval< int > &inl, const Interval< int > &crl) const
 returns m2
float computeArea (bool work) const
 returns m2
Coord3 oneStepTranslation (const Coord3 &planenormal) const
const CubeSamplingsampling (bool work) const
Coord transform (const BinID &b) const
BinID transform (const Coord &) const
Unit xyUnit () const
Unit zUnit () const
bool xyInFeet () const
bool zIsTime () const
bool zInMeter () const
bool zInFeet () const
const char * getXYUnitString (bool withparens=true) const
const char * getZUnitString (bool withparens=true) const
float zFactor () const
 Factor between real and displayed unit in UI.
bool depthsInFeetByDefault () const
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.
bool isReasonable (const Coord &) const
 Checks if in or near survey.
int maxNrTraces (bool work) const
void checkInlRange (Interval< int > &, bool work) const
 Makes sure range is inside.
void checkCrlRange (Interval< int > &, bool work) const
 Makes sure range is inside.
void checkZRange (Interval< float > &, bool work) const
 Makes sure range is inside.
bool includes (const BinID &, const float, bool work) const
 Returns true when pos is inside survey-range.
void snap (BinID &, BinID direction=BinID(0, 0)) const
 dir = 0 : auto; -1 round downward, 1 round upward
void snapStep (BinID &, BinID direction=BinID(0, 0)) const
 see snap() for direction
void snapZ (float &, int direction=0) const
 see snap() for direction
const IOParpars () const
void putZDomain (IOPar &) const
void setWorkRange (const CubeSampling &)
const RCol2CoordbinID2Coord () const
void get3Pts (Coord c[3], BinID b[2], int &xline) const
const LatLong2Coordlatlong2Coord () const
bool isClockWise () const
float computeAngleXInl () const
void setXYInFeet (bool yn=true)
void setZUnit (bool istime, bool infeet=false)
float zScale () const
BufferString getDirName () const
Pol2D survDataType () const
void setSurvDataType (Pol2D typ)
const char * comment () const
const char * getWSProjName () const
const char * getWSPwd () const
 SurveyInfo (const SurveyInfo &)
SurveyInfooperator= (const SurveyInfo &)
RCol2CoordgetBinID2Coord () const
LatLong2CoordgetLatlong2Coord () const
IOPargetPars () const
bool write (const char *basedir=0) const
 Write to .survey file.
void savePars (const char *basedir=0) const
 Write to .defs file.
void setRange (const CubeSampling &, bool)
const char * set3Pts (const Coord c[3], const BinID b[2], int xline)
void gen3Pts ()
void setComment (const char *s)
void setInvalid () const
void setWSProjName (const char *nm) const
void setWSPwd (const char *nm) const

Static Public Member Functions

static float zFactor (bool time)
 Factor between real and displayed unit in UI.
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 * sKeyWSProjName ()
static const char * sKeyXYInFt ()
static const char * sKeyDpthInFt ()
 Not used by SI, just a UI default.
static const char * sKeySurvDataType ()
static const EnumDefPol2DDef ()
static const char ** Pol2DNames ()
static bool parseEnumPol2D (const char *, Pol2D &)
static const char * getPol2DString (Pol2D)
static SurveyInforead (const char *)

Public Attributes

Notifier< SurveyInfoworkRangeChg

Protected Member Functions

 SurveyInfo ()
void handleLineRead (const BufferString &, const char *)
bool wrapUpRead ()
void writeSpecLines (ascostream &) const
void setTr (RCol2Coord::RCTransform &, const char *)
void putTr (const RCol2Coord::RCTransform &, ascostream &, const char *) const

Static Protected Member Functions

static void deleteInstance ()

Protected Attributes

bool valid_
BufferString datadir
BufferString dirname
bool zistime_
bool zinfeet_
 only relevant if zistime_ equals false
bool xyinfeet_
 only relevant for a few cases
BufferString comment_
BufferString wsprojnm_
BufferString wspwd_
CubeSamplingcs_
CubeSamplingwcs_
IOParpars_
RCol2Coord b2c_
LatLong2Coordll2c_
BinID set3binids [3]
Coord set3coords [3]
Pol2D survdatatype_
bool survdatatypeknown_

Static Protected Attributes

static SurveyInfotheinst_
static const char * Pol2DNames_ []
static const EnumDef Pol2DDefinition_

Private Attributes

RCol2Coord::RCTransform rdxtr
RCol2Coord::RCTransform rdytr

Friends

class IOMan
class uiSurvey
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

const RCol2Coord& 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::computeAngleXInl (  )  const

It's the angle (0 to pi/2) between the X-axis and the Inl-axis (not an inline)

float SurveyInfo::computeArea ( const Interval< int > &  inl,
const Interval< int > &  crl 
) const

returns m2

float SurveyInfo::computeArea ( bool  work  )  const

returns m2

float SurveyInfo::crlDistance (  )  const
StepInterval<int> SurveyInfo::crlRange ( bool  work  )  const
int SurveyInfo::crlStep (  )  const
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 (  )  [static, protected]
bool SurveyInfo::depthsInFeetByDefault (  )  const
void SurveyInfo::gen3Pts (  ) 
void SurveyInfo::get3Pts ( Coord  c[3],
BinID  b[2],
int &  xline 
) const
RCol2Coord& SurveyInfo::getBinID2Coord (  )  const [inline]
BufferString SurveyInfo::getDirName (  )  const [inline]
LatLong2Coord& SurveyInfo::getLatlong2Coord (  )  const [inline]
IOPar& SurveyInfo::getPars (  )  const [inline]
static const char* SurveyInfo::getPol2DString ( Pol2D   )  [static]
const char* SurveyInfo::getWSProjName (  )  const [inline]
const char* SurveyInfo::getWSPwd (  )  const [inline]
const char* SurveyInfo::getXYUnitString ( bool  withparens = true  )  const
const char* SurveyInfo::getZUnitString ( bool  withparens = true  )  const
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

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

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

Checks if in or near survey.

bool SurveyInfo::isReasonable ( const BinID  )  const

Checks if in or near survey.

bool SurveyInfo::isValid (  )  const [inline]
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::parseEnumPol2D ( const char *  ,
Pol2D  
) [static]
static const EnumDef& SurveyInfo::Pol2DDef (  )  [static]
static const char** SurveyInfo::Pol2DNames (  )  [static]
void SurveyInfo::putTr ( const RCol2Coord::RCTransform ,
ascostream ,
const char *   
) const [protected]
void SurveyInfo::putZDomain ( IOPar  )  const
static SurveyInfo* SurveyInfo::read ( const char *   )  [static]
const CubeSampling& SurveyInfo::sampling ( bool  work  )  const [inline]
void SurveyInfo::savePars ( const char *  basedir = 0  )  const

Write to .defs file.

const char* SurveyInfo::set3Pts ( const Coord  c[3],
const BinID  b[2],
int  xline 
)
void SurveyInfo::setComment ( const char *  s  )  [inline]
void SurveyInfo::setInvalid (  )  const
void SurveyInfo::setRange ( const CubeSampling ,
bool   
)
void SurveyInfo::setSurvDataType ( Pol2D  typ  )  [inline]
void SurveyInfo::setTr ( RCol2Coord::RCTransform ,
const char *   
) [protected]
void SurveyInfo::setWorkRange ( const CubeSampling  ) 
void SurveyInfo::setWSProjName ( const char *  nm  )  const [inline]
void SurveyInfo::setWSPwd ( const char *  nm  )  const [inline]
void SurveyInfo::setXYInFeet ( bool  yn = true  )  [inline]
void SurveyInfo::setZUnit ( bool  istime,
bool  infeet = false 
)
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::sKeySurvDataType (  )  [static]
static const char* SurveyInfo::sKeyWSProjName (  )  [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 ,
BinID  direction = BinID(0, 0) 
) const

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

void SurveyInfo::snapStep ( BinID ,
BinID  direction = 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]
BinID SurveyInfo::transform ( const Coord  )  const
Note:
BinID will be snapped using work step.
Coord SurveyInfo::transform ( const BinID b  )  const [inline]
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 [inline]
Unit SurveyInfo::xyUnit (  )  const
static float SurveyInfo::zFactor ( bool  time  )  [static]

Factor between real and displayed unit in UI.

float SurveyInfo::zFactor (  )  const

Factor between real and displayed unit in UI.

bool SurveyInfo::zInFeet (  )  const [inline]
bool SurveyInfo::zInMeter (  )  const [inline]
bool SurveyInfo::zIsTime (  )  const [inline]
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

Friends And Related Function Documentation

friend class IOMan [friend]
const SurveyInfo& SI (  )  [friend]
friend class uiSurvey [friend]
friend class uiSurveyInfoEditor [friend]

Member Data Documentation

IOPar& SurveyInfo::pars_ [protected]
const EnumDef SurveyInfo::Pol2DDefinition_ [static, protected]
const char* SurveyInfo::Pol2DNames_[] [static, protected]
BinID SurveyInfo::set3binids[3] [protected]
Coord SurveyInfo::set3coords[3] [protected]
SurveyInfo* SurveyInfo::theinst_ [static, protected]
bool SurveyInfo::valid_ [protected]
bool SurveyInfo::xyinfeet_ [protected]

only relevant for a few cases

bool SurveyInfo::zinfeet_ [protected]

only relevant if zistime_ equals false

bool SurveyInfo::zistime_ [protected]