02.05.2014 Views

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Coordinate Systems<br />

using the GetAllCoordSysNames method. It also shows how to retrieve a specific<br />

coordinate system using the method GetCoordSys.<br />

// Get the coordinate system service.<br />

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

// Get an array of all available coordinate systems.<br />

String[] allCoordSystems = csService.GetAllCoordSysNames();<br />

// Get the needed coordinate systems.<br />

ICoordSys cs = csService.GetCoordSys(“MENTOR:UTM84-31N”);<br />

After getting a reference to the desired coordinate system we can start using different<br />

parts of the CoordSysService.<br />

Coordinate System Converter<br />

The primary coordinate services functionality provided by <strong>Ocean</strong> deals with converting<br />

position data between coordinate systems or between spherical and projected<br />

representations in the same coordinate system. The concept of a coordinate system<br />

converter is obviously going to play an important role. Converters are implementations of<br />

the ICoordSysConverter interface. ICoordSysConverter is defined as:<br />

public interface ICoordSysConverter<br />

{<br />

PrePostUnitConversions PrePostUC;<br />

Point3 Convert (Point3 point, out ReturnStatus status);<br />

Point3 [ ] Convert (Point3[ ] points, out ReturnStatus status);<br />

ReturnStatus ConvertPoint (ref Point3 point);<br />

ReturnStatus ConvertPointArray (ref Point3 [ ] points);<br />

}<br />

<strong>Schlumberger</strong> Private<br />

<strong>Ocean</strong> Services 4-217

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

Saved successfully!

Ooh no, something went wrong!