02.05.2014 Views

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Coordinate Systems<br />

systems available to the service. It provides methods to create converters between user<br />

supplied coordinate systems and between projected and spherical coordinates in an<br />

individual system. The ICoordSysService interface is defined as:<br />

public interface ICoordSysService<br />

{<br />

ICoordSysConverter CreateConverter(ICoordSys csFrom,<br />

ICoordSys csTo,<br />

PrePostUnitConversions prePost);<br />

ICoordSysConverter CreateConverterFromReference(ICoordSys cs,<br />

PrePostUnitConversions post);<br />

ICoordSysConverter CreateConverterToReference(ICoordSys cs,<br />

PrePostUnitConversions post);<br />

string[ ] GetAllCoordSysNames();<br />

ICoordSys GetCoordSys(string name);<br />

void RegisterEngine(ICoordSysEngine engine);<br />

}<br />

Access to the coordinate system services is made available through the product family.<br />

The product family will define the coordinate system module and the coordinate system<br />

engine in its configuration file. The information provided is the coordinate system class<br />

that implements IModule and the assembly name. The configuration file module<br />

definitions required are:<br />

<br />

< Module type=”Slb.<strong>Ocean</strong>.CoordinateSystems.Module,<br />

Slb.<strong>Ocean</strong>.CoordinateSystems” /><br />

< Module type=”Slb.<strong>Ocean</strong>.CoordinateSystems.MentorEngine.Module,<br />

Slb.<strong>Ocean</strong>.CoordinateSystems.MentorEngine” /><br />

With the coordinate system service defined in the configuration file, it may be found by the<br />

application.<br />

...<br />

ICoordSysService cs = CoreSystem.GetService();<br />

...<br />

From the coordinate system service, the specific coordinate system(s) to be used may be<br />

instantiated. If the identity of the desired system is known, then it may be instantiated<br />

directly. A list of available coordinate systems may be created so a selection may be made.<br />

The following code sample shows how to get a list of all coordinate systems available<br />

4-216 <strong>Ocean</strong> Application Development Framework 2008.1<br />

<strong>Schlumberger</strong> Private

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!