OpendTect-6_4  6.4
survgeom2d.h
Go to the documentation of this file.
1 #ifndef survgeom2d_h
2 #define survgeom2d_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Bert
9  Date: Aug 2010
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 
16 #include "basicmod.h"
17 #include "survgeom.h"
18 
19 namespace PosInfo { class Line2DData; }
20 
21 
22 namespace Survey
23 {
24 
27 mExpClass(Basic) Geometry2D : public Geometry
28 {
29 public:
30  Geometry2D(const char* lnm);
33 
34  virtual bool is2D() const { return true; }
35  virtual const char* getName() const;
36 
37  void add(const Coord&,int trcnr,int spnr);
38  void add(double x,double y,int trcnr,int spnr);
39  int size() const;
40  void setEmpty();
41  bool getPosByTrcNr(int trcnr,Coord&,int& spnr) const;
42  bool getPosBySPNr(int spnr,Coord&,int& trcnr) const;
43  bool getPosByCoord(const Coord&,
44  int& trc,int& sp) const;
45 
46  virtual Coord toCoord(int linenr,int tracenr) const;
47  virtual TrcKey nearestTrace(const Coord&,float* dist) const;
48 
49  virtual bool includes(int linenr,int tracenr) const;
50 
51  PosInfo::Line2DData& dataAdmin() { return data_; }
53  void touch();
54  const PosInfo::Line2DData& data() const { return data_; }
55  TypeSet<int>& spnrs() { return spnrs_; }
56  const TypeSet<int>& spnrs() const { return spnrs_; }
57 
58  StepInterval<float> zRange() const;
59 
60  static BufferString makeUniqueLineName(const char* lsnm,
61  const char* lnm);
62  float averageTrcDist() const;
63  void setAverageTrcDist(float);
64  float lineLength() const;
65  void setLineLength(float);
66  RelationType compare(const Geometry&,bool usezrg) const;
67 
68  Geometry2D* as2D() { return this; }
69 
70 protected:
71  ~Geometry2D();
72 
75  mutable float trcdist_;
76  mutable float linelength_;
78 };
79 
80 } // namespace Survey
81 
82 #endif
#define mExpClass(module)
Definition: commondefs.h:160
virtual bool is2D() const
Definition: survgeom2d.h:34
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:53
PosInfo::Line2DData & dataAdmin()
If data is changed, call touch afterwards.
Definition: survgeom2d.h:51
Geometry of a 2D Line.
Definition: survgeom2d.h:27
Threads::Lock lock_
Definition: survgeom2d.h:77
const PosInfo::Line2DData & data() const
Definition: survgeom2d.h:54
Position info for a 2D line.
Definition: posinfo2d.h:65
TypeSet< int > & spnrs()
Definition: survgeom2d.h:55
A cartesian coordinate in 2D space.
Definition: coord.h:25
RelationType
Definition: survgeom.h:45
PosInfo::Line2DData & data_
Definition: survgeom2d.h:73
Position info, often segmented.
Definition: posinfo.h:40
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
TypeSet< int > spnrs_
Definition: survgeom2d.h:74
const TypeSet< int > & spnrs() const
Definition: survgeom2d.h:56
Definition: survgeom.h:25
Represents a unique trace position in one of the surveys that OpendTect is managing.
Definition: trckey.h:28
float linelength_
Definition: survgeom2d.h:76
Definition: arraytesselator.h:21
Geometry2D * as2D()
Definition: survgeom2d.h:68
float trcdist_
Definition: survgeom2d.h:75

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