OpendTect  6.6
wellimpasc.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 #include "wellmod.h"
15 
16 #include "bufstringset.h"
17 #include "coord.h"
18 #include "ranges.h"
19 #include "tableascio.h"
20 #include "typeset.h"
21 #include "od_iosfwd.h"
22 #include "uistring.h"
23 
24 namespace Table { class FormatDesc; }
25 class UnitOfMeasure;
26 
27 
28 namespace Well
29 {
30 class Data;
31 class Track;
32 class D2TModel;
33 class MarkerSet;
34 
41 public:
42 
43  LASImporter( Data& d ) : wd_(&d), useconvs_(false) {}
44  LASImporter() : wd_(0), useconvs_(false) {}
46 
49  public:
50  ~FileInfo() {}
51 
52  int size() const { return lognms.size(); }
53 
58  bool revz = false;
59  int depthcolnr = -1;
60  float undefval = -999.25f;
62 
70  Coord loc_ = Coord::udf();
71  double kbelev_ = mUdf(double);
72  double glelev_ = mUdf(double);
73  };
74 
75  void setData( Data* wd ) { wd_ = wd; }
76  void copyInfo(const FileInfo&,bool& changed);
77  void adjustTrack(const Interval<float>& zrg,bool istvdss,
78  bool& changed);
79  const char* getLogInfo(const char* lasfnm,FileInfo&) const;
80  const char* getLogInfo(od_istream& lasstrm,FileInfo&) const;
81  const char* getLogs(const char* lasfnm,const FileInfo&,
82  bool istvd=true,bool usecurvenms=false);
83  const char* getLogs(od_istream& lasstrm,const FileInfo&,
84  bool istvd=true,bool usecurvenms=false);
85 
86  bool willConvertToSI() const { return useconvs_; }
88  void setConvertToSI( bool yn ) { useconvs_ = yn; }
90 
91  static const char* fileFilter();
92 
93 protected:
94 
96 
99  bool useconvs_;
100 
101  void parseHeader(char*,char*&,char*&,char*&) const;
102  static void parseLocation(const char*,const char*,Coord&);
103  const char* getLogData(od_istream&,const BoolTypeSet&,
104  const FileInfo&,bool,int,int);
105 
106 };
107 
108 
115 public:
116  TrackAscIO( const Table::FormatDesc& fd,
117  od_istream& strm )
118  : Table::AscIO(fd)
119  , strm_(strm) {}
120 
122  bool getData(Data&,float kbelev=mUdf(float),
123  float td=mUdf(float)) const;
124 
125 protected:
126 
130  double& kbelevinfile) const;
133  double& kbelevinfile) const;
135  Coord& surfacecoord) const;
136 
137 };
138 
139 
146  public:
147  D2TModelAscIO( const Table::FormatDesc& fd )
148  : Table::AscIO(fd) {}
149 
150  static Table::FormatDesc* getDesc(bool withunitfld);
151  static void updateDesc(Table::FormatDesc&,bool withunitfld);
152  static void createDescBody(Table::FormatDesc*,bool unitfld);
153 
155  const Well::Data&) const;
156 };
157 
158 
165 public:
166  MarkerSetAscIO( const Table::FormatDesc& fd )
167  : Table::AscIO(fd) {}
168 
170 
171  bool get(od_istream&,MarkerSet&,const Track&) const;
172 
173 };
174 
175 
182 public:
184  od_istream&);
185 
187  bool get(BufferString& wellnm,Coord3& crd,float& md,
188  BufferString& uwi) const;
189  bool depthIsTVD() const;
190 
191 protected:
192 
194 
195 };
196 
197 
204 public:
206 
208  bool get(BufferString& wellnm,
209  float& md,BufferString& markernm) const;
210  bool identifierIsUWI() const;
211 
212 protected:
213 
215 
216 };
217 
218 
225 public:
227  od_istream&);
229 
231  bool get(BufferString& wellnm,float& md,float& twt);
232  bool identifierIsUWI() const;
233 
234 protected:
235 
239 };
240 
241 
248 public:
250  od_istream&);
251 
253  bool getData(Data&,float kb) const;
254 
255 protected:
257  TypeSet<double>&) const;
259 
260 };
261 
262 
265 public:
267  od_istream&);
268 
270  bool get(BufferString& wellnm,double& md,
271  double& incl,double& azi) const;
272  bool identifierIsUWI() const;
273 
274 protected:
276 
277 };
278 
279 } // namespace Well
280 
Well::BulkMarkerAscIO
Bulk MarkerSet Ascii I/O.
Definition: wellimpasc.h:203
Coord3
A cartesian coordinate in 3D space.
Definition: coord.h:72
Well::TrackAscIO::adjustSurfaceLocation
bool adjustSurfaceLocation(TypeSet< Coord3 > &, Coord &surfacecoord) const
Well::MarkerSetAscIO::mODTextTranslationClass
mODTextTranslationClass(MarkerSetAscIO) public
Definition: wellimpasc.h:164
Well::LASImporter::FileInfo::logunits
BufferStringSet logunits
Definition: wellimpasc.h:55
Well::LASImporter::adjustTrack
void adjustTrack(const Interval< float > &zrg, bool istvdss, bool &changed)
Well::LASImporter::getLogs
const char * getLogs(const char *lasfnm, const FileInfo &, bool istvd=true, bool usecurvenms=false)
Well::LASImporter::setConvertToSI
void setConvertToSI(bool yn)
Note that depth is always converted.
Definition: wellimpasc.h:88
Well::D2TModelAscIO::get
bool get(od_istream &, Well::D2TModel &, const Well::Data &) const
Well::D2TModelAscIO::createDescBody
static void createDescBody(Table::FormatDesc *, bool unitfld)
Well::LASImporter::useconvs_
bool useconvs_
Definition: wellimpasc.h:99
Well::BulkMarkerAscIO::strm_
od_istream & strm_
Definition: wellimpasc.h:214
uistring.h
Well::Data
The holder of all data concerning a certain well.
Definition: welldata.h:121
Well::LASImporter::setData
void setData(Data *wd)
Definition: wellimpasc.h:75
tableascio.h
ObjectSet< const UnitOfMeasure >
Well::BulkMarkerAscIO::identifierIsUWI
bool identifierIsUWI() const
BufferStringSet
Set of BufferString objects.
Definition: bufstringset.h:26
Well::LASImporter::getLogData
const char * getLogData(od_istream &, const BoolTypeSet &, const FileInfo &, bool, int, int)
Well::TrackAscIO
Track Ascii I/O.
Definition: wellimpasc.h:114
Well::LASImporter::LASImporter
LASImporter()
Definition: wellimpasc.h:44
Well::LASImporter::parseHeader
void parseHeader(char *, char *&, char *&, char *&) const
Well::TrackAscIO::computeMissingValues
bool computeMissingValues(TypeSet< Coord3 > &, TypeSet< double > &, double &kbelevinfile) const
Well::LASImporter::FileInfo::state_
BufferString state_
Definition: wellimpasc.h:66
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
od_istream
OD class for stream read common access to the std::cin.
Definition: od_istream.h:24
Well::LASImporter::convs_
ObjectSet< const UnitOfMeasure > convs_
Definition: wellimpasc.h:98
Well::D2TModelAscIO
D2TModel Ascii I/O.
Definition: wellimpasc.h:145
typeset.h
Well::BulkTrackAscIO::depthIsTVD
bool depthIsTVD() const
Well::LASImporter::FileInfo::zunitstr
BufferString zunitstr
only info; not used by getLogs
Definition: wellimpasc.h:61
Table
Definition: geom2dascio.h:20
Well::LASImporter::FileInfo::logcurves
BufferStringSet logcurves
Definition: wellimpasc.h:54
Well::LASImporter::wd_
Data * wd_
Definition: wellimpasc.h:95
Well::LASImporter::FileInfo::size
int size() const
Definition: wellimpasc.h:52
Repos::Data
@ Data
Definition: repos.h:24
Well::TrackAscIO::mODTextTranslationClass
mODTextTranslationClass(TrackAscIO) public
Definition: wellimpasc.h:114
Well::MarkerSetAscIO::getDesc
static Table::FormatDesc * getDesc()
mODTextTranslationClass
#define mODTextTranslationClass(clss)
Definition: uistring.h:40
Well::BulkDirectionalAscIO::strm_
od_istream & strm_
Definition: wellimpasc.h:275
Well::BulkMarkerAscIO::get
bool get(BufferString &wellnm, float &md, BufferString &markernm) const
Well::TrackAscIO::getData
bool getData(Data &, float kbelev=mUdf(float), float td=mUdf(float)) const
Coord
A cartesian coordinate in 2D space.
Definition: coord.h:25
Well::MarkerSetAscIO
MarkerSet Ascii I/O.
Definition: wellimpasc.h:164
Well::LASImporter::getLogs
const char * getLogs(od_istream &lasstrm, const FileInfo &, bool istvd=true, bool usecurvenms=false)
Well::DirectionalAscIO::getData
bool getData(Data &, float kb) const
Well::BulkTrackAscIO::strm_
od_istream & strm_
Definition: wellimpasc.h:193
Well::MarkerSetAscIO::get
bool get(od_istream &, MarkerSet &, const Track &) const
Well::Track
Well track.
Definition: welltrack.h:29
Well
Definition: directionalsurvey.h:20
Well::D2TModelAscIO::updateDesc
static void updateDesc(Table::FormatDesc &, bool withunitfld)
Well::LASImporter::FileInfo::mODTextTranslationClass
mODTextTranslationClass(FileInfo) public
Definition: wellimpasc.h:48
Well::LASImporter::FileInfo::wellnm
BufferString wellnm
Definition: wellimpasc.h:65
Well::BulkD2TModelAscIO::wellsdata_
ObjectSet< Data > wellsdata_
Definition: wellimpasc.h:238
Well::LASImporter::unitmeasstrs_
BufferStringSet unitmeasstrs_
Definition: wellimpasc.h:97
Well::BulkD2TModelAscIO::getDesc
static Table::FormatDesc * getDesc()
Well::BulkTrackAscIO
Bulk WellTrack Ascii I/O.
Definition: wellimpasc.h:181
Well::TrackAscIO::getDesc
static Table::FormatDesc * getDesc()
Well::BulkD2TModelAscIO::wells_
BufferStringSet wells_
Definition: wellimpasc.h:237
Well::DirectionalAscIO::strm_
od_istream & strm_
Definition: wellimpasc.h:258
Well::BulkDirectionalAscIO
Definition: wellimpasc.h:264
Well::MarkerSet
Set of Markers.
Definition: wellmarker.h:76
Well::LASImporter::getLogInfo
const char * getLogInfo(const char *lasfnm, FileInfo &) const
Well::BulkD2TModelAscIO::identifierIsUWI
bool identifierIsUWI() const
Well::DirectionalAscIO::getDesc
static mODTextTranslationClass(DirectionalAscIO) public Table::FormatDesc * getDesc()
Well::LASImporter::~LASImporter
~LASImporter()
Well::LASImporter::FileInfo::comp_
BufferString comp_
Definition: wellimpasc.h:64
Well::BulkMarkerAscIO::getDesc
static mODTextTranslationClass(BulkMarkerAscIO) public Table::FormatDesc * getDesc()
Well::LASImporter::FileInfo
Definition: wellimpasc.h:48
Well::LASImporter::FileInfo::uwi
BufferString uwi
Definition: wellimpasc.h:69
Well::LASImporter
Imports files in LAS ( Log Ascii Standard ) format.
Definition: wellimpasc.h:40
Well::LASImporter::mODTextTranslationClass
mODTextTranslationClass(LASImporter) public
Definition: wellimpasc.h:40
Well::BulkD2TModelAscIO::strm_
od_istream & strm_
Definition: wellimpasc.h:236
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
UnitOfMeasure
Unit of Measure.
Definition: unitofmeasure.h:35
bufstringset.h
Well::LASImporter::copyInfo
void copyInfo(const FileInfo &, bool &changed)
Well::LASImporter::FileInfo::srvc_
BufferString srvc_
Definition: wellimpasc.h:68
Well::BulkTrackAscIO::getDesc
static mODTextTranslationClass(BulkTrackAscIO) public Table::FormatDesc * getDesc()
od_iosfwd.h
Well::BulkDirectionalAscIO::get
bool get(BufferString &wellnm, double &md, double &incl, double &azi) const
Well::D2TModelAscIO::getDesc
static Table::FormatDesc * getDesc(bool withunitfld)
Well::BulkD2TModelAscIO::~BulkD2TModelAscIO
mODTextTranslationClass(BulkD2TModelAscIO) public ~BulkD2TModelAscIO()
mUdf
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:274
Well::LASImporter::FileInfo::county_
BufferString county_
Definition: wellimpasc.h:67
Well::BulkDirectionalAscIO::getDesc
static mODTextTranslationClass(BulkDirectionalAscIO) public Table::FormatDesc * getDesc()
Well::LASImporter::fileFilter
static const char * fileFilter()
Interval::udf
static Interval< T > udf()
Definition: ranges.h:126
Well::LASImporter::FileInfo::lognms
BufferStringSet lognms
Definition: wellimpasc.h:56
Table::FormatDesc
description of input our output data content
Definition: tabledef.h:220
Well::LASImporter::getLogInfo
const char * getLogInfo(od_istream &lasstrm, FileInfo &) const
ranges.h
Coord::udf
static const Coord & udf()
Well::LASImporter::parseLocation
static void parseLocation(const char *, const char *, Coord &)
Interval< float >
Well::TrackAscIO::strm_
od_istream & strm_
Definition: wellimpasc.h:127
Well::D2TModel
Depth to time model.
Definition: welld2tmodel.h:34
Well::BulkD2TModelAscIO
Bulk D2TModel Ascii I/O.
Definition: wellimpasc.h:224
Well::BulkDirectionalAscIO::identifierIsUWI
bool identifierIsUWI() const
Well::DirectionalAscIO::readFile
bool readFile(TypeSet< double > &, TypeSet< double > &, TypeSet< double > &) const
Well::DirectionalAscIO
Directional survey Ascii I/O.
Definition: wellimpasc.h:247
Well::BulkTrackAscIO::get
bool get(BufferString &wellnm, Coord3 &crd, float &md, BufferString &uwi) const
Table::AscIO
Ascii I/O using Format Description.
Definition: tableascio.h:42
Well::LASImporter::willConvertToSI
bool willConvertToSI() const
Note that depth is always converted.
Definition: wellimpasc.h:86
Well::TrackAscIO::readTrackData
bool readTrackData(TypeSet< Coord3 > &, TypeSet< double > &, double &kbelevinfile) const
TypeSet< BoolTypeSetType >
Well::BulkD2TModelAscIO::get
bool get(BufferString &wellnm, float &md, float &twt)
Well::D2TModelAscIO::mODTextTranslationClass
mODTextTranslationClass(D2TModelAscIO) public
Definition: wellimpasc.h:145
coord.h

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