[OpendTect_Developers] Introduction to new 2D Geometry in OpendTect

Satyaki Maitra satyaki at opendtect.org
Mon Dec 20 03:40:25 CET 2010


Hi all

As was mentioned by Nanne in one of our previous posts, we have 
introduced some major changes in the way we handle 2D Geometry for 
Seismics and Horizons  In this post I will try to focus on the basic 
concepts of new way of handling the the 2D Geometry.


Previously geometry of a 2D line was embedded in Seismics (.cbvs) file 
itself. So while displaying any 2D seismics line or 2D horizons one had 
to call the syncLine() function which used to read the seismics file and 
get the geometry from that. We have got rid of that dependency for the 
seimics (.cbvs) file. We now store the 2D geometry in a separate 
directory called '2DGeom'. This '2DGeom' directory in unique for a 
particular survey. It contains several sub directories (each 
corresponding to a particular lineset) which contains the geometries of 
all the lines. To make things more simpler and accessible each 'LineSet' 
and 'Line' has been assigned an ID. A combination of the ID for 
'LineSet' and 'Line' is now called a *GeomID*.

So if there are e.g 2 LineSet 'A' and 'B' and they in turn have 2 lines 
each 'A1' and 'A2' ( both belonging to 'A' ) and 'B1' and 'B2' ( both 
belonging to B ), then their ID's will be in the form :

GeomID = linesetID.lineID;

Thus in this case the GeomID's will be :

GeomID of A1 : 0.0 , GeomID of A2 : 0.1
GeomID of B1 : 1.0 , GeomID of B2 : 1.1


Thus each and every line gets tied to a unique GeomID. The 
*PosInfo::Survey2D* class in *Basic/surv2dgeom.h* handles all these 
geometries. There are several utility functions to set or get Geometries 
, get GeomID s from linesetname or linename etc which can be found here. 
Before getting the geometry of a particular line you need to set the 
correct LineSet An example code will explain this better.

/*
           PosInfo::Line2DData linegeom( linename );
           S2DPOS().setCurLineSet(  lsobj->name() );
           S2DPOS().getGeometry( linegeom )
*/


One thing is worth mentioning here which many developers may confuse is 
that you should *not* pass the linename as combination of linename and 
attribute ( as in LineKey ) as you might have done it in earlier cases 
in many parts of OpendTect. BTW the Seis2DLineSet class has been 
stripped of some functionalities. Thus this class can no longer be used 
to set or get geometries. So the *PosInfo::Survey2D* class is the only 
way to get the 2D geometry.

That's a synopsis of what the new 2D Geometry concept is all about. In 
case of a confusion, do come back to me.

Happy Programming
Satyaki

-- 
- Satyaki Maitra
- OpendTect Developer
-
- dGB Earth Sciences
- 304, Gateway Plaza, Hiranandani Gardens,
- Powai, Mumbai 400 076, India
- Phone: +91 22 25704984 , Fax: +91 22 25704977
- Mobile: +91 9930856158
- mailto:satyaki.maitra at opendtect.com
- http://www.opendtect.org






More information about the Developers mailing list