OpendTect  6.6
welltrack.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Bert Bril
8  Date: Aug 2003
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 
13 -*/
14 
15 #include "wellmod.h"
16 #include "welldahobj.h"
17 #include "position.h"
18 
19 namespace Well
20 {
21 
22 class Data;
23 
29 {
30 public:
31 
32  Track( const char* nm=0 )
33  : DahObj(nm), zistime_(false) {}
34  Track( const Track& t )
35  : DahObj("") { *this = t; }
36  Track& operator =(const Track&);
37 
38  bool isEmpty() const;
39  const Coord3& pos( int idx ) const { return pos_[idx]; }
40  float value( int idx ) const { return (float) pos_[idx].z; }
41  float getKbElev() const;
42  float td() const
43  { return isEmpty() ? 0 : dah_.last(); }
44  int size() const { return pos_.size(); }
45  bool zIsTime() const { return zistime_; }
46  const Interval<double> zRangeD() const;
47  const Interval<float> zRange() const;
49 
50  int insertPoint(const Coord3&);
51  int insertPoint(const Coord&,float z);
55  void addPoint(const Coord3&,float dah=mUdf(float));
56  void addPoint(const Coord&,float z,float dah=mUdf(float));
58  void setPoint(int,const Coord3&);
59  void setPoint(int,const Coord&,float z);
61  void insertAfterIdx(int,const Coord3&);
63  void removePoint(int);
65 
66  Coord3 getPos(float d_ah) const;
67  const TypeSet<Coord3>& getAllPos() const { return pos_; }
68 
69  float getDahForTVD(double,float prevdah=mUdf(float)) const;
70  float getDahForTVD(float,float prevdah=mUdf(float)) const;
73  float nearestDah(const Coord3&) const;
74  // If zIsTime() z must be time
75 
76  // If you know what you're doing:
77  Coord3 coordAfterIdx(float d_ah,int) const;
79 
80  bool insertAtDah(float dah,float zpos);
82 
83  bool alwaysDownward() const;
84  void toTime(const Data&);
85 
86 protected:
87 
88 
90  bool zistime_;
91 
92  void removeAux( int idx ) { pos_.removeSingle(idx); }
93  void eraseAux() { pos_.erase(); }
94 
95 public:
96 
97  bool extendIfNecessary(const Interval<float>& dahrg);
99 
100 };
101 
102 
103 }; // namespace Well
104 
Well::Track::size
int size() const
Definition: welltrack.h:44
Coord3
A cartesian coordinate in 3D space.
Definition: coord.h:72
Well::Track::insertPoint
int insertPoint(const Coord &, float z)
Well::Track::Track
Track(const char *nm=0)
Definition: welltrack.h:32
Well::Track::getDahForTVD
float getDahForTVD(float, float prevdah=mUdf(float)) const
Well::Track::td
float td() const
Definition: welltrack.h:42
Well::Track::coordAfterIdx
Coord3 coordAfterIdx(float d_ah, int) const
Beware: no bounds check on index.
Well::Data
The holder of all data concerning a certain well.
Definition: welldata.h:121
Well::Track::pos_
TypeSet< Coord3 > pos_
Definition: welltrack.h:89
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
Well::Track::setPoint
void setPoint(int, const Coord &, float z)
Will correct all dahs below point.
Well::Track::addPoint
void addPoint(const Coord &, float z, float dah=mUdf(float))
Point must be further down track. No checks.
Well::Track::insertPoint
int insertPoint(const Coord3 &)
Well::Track::getAllPos
const TypeSet< Coord3 > & getAllPos() const
Definition: welltrack.h:67
Well::Track::value
float value(int idx) const
Definition: welltrack.h:40
Well::Track::extendIfNecessary
bool extendIfNecessary(const Interval< float > &dahrg)
return if changed
Well::Track::nearestDah
float nearestDah(const Coord3 &) const
Repos::Data
@ Data
Definition: repos.h:24
isEmpty
bool isEmpty(const NLAModel *mdl)
Well::Track::toTime
void toTime(const Data &)
Well::Track::getKbElev
float getKbElev() const
Well::Track::zistime_
bool zistime_
Definition: welltrack.h:90
Well::Track::addPoint
void addPoint(const Coord3 &, float dah=mUdf(float))
Coord
A cartesian coordinate in 2D space.
Definition: coord.h:25
Well::Track::insertAfterIdx
void insertAfterIdx(int, const Coord3 &)
Know what you're doing - not used normally.
Well::Track::zRange
const Interval< float > zRange() const
returns (0, 0) for empty track
Well::Track
Well track.
Definition: welltrack.h:29
Well
Definition: directionalsurvey.h:20
Well::Track::getPos
Coord3 getPos(float d_ah) const
Well::Track::removePoint
void removePoint(int)
Will correct all dahs below point.
Well::Track::alwaysDownward
bool alwaysDownward() const
Well::Track::insertAtDah
bool insertAtDah(float dah, float zpos)
will interpolate x,y coords
Well::Track::setPoint
void setPoint(int, const Coord3 &)
position.h
Well::Track::Track
Track(const Track &t)
Definition: welltrack.h:34
Well::Track::isEmpty
bool isEmpty() const
Well::Track::getDahForTVD
float getDahForTVD(double, float prevdah=mUdf(float)) const
welldahobj.h
Well::Track::zIsTime
bool zIsTime() const
Definition: welltrack.h:45
mUdf
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:274
Well::Track::removeAux
void removeAux(int idx)
Definition: welltrack.h:92
Well::Track::zRangeD
const Interval< double > zRangeD() const
Interval< double >
Well::Track::pos
const Coord3 & pos(int idx) const
Definition: welltrack.h:39
Well::Track::eraseAux
void eraseAux()
Definition: welltrack.h:93
TypeSet< Coord3 >
Well::DahObj
Depth/Distance along hole object.
Definition: welldahobj.h:28

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