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 />

The following code sample shows Convert method examples using the converters<br />

created above.<br />

// Convert point from source to target coordinate system<br />

Point3 targetPoint = csConverter.Convert( sourcePoint, returnStatus );<br />

Point3 [] targetPoints = csConverter.Convert( sourcePoints,<br />

returnStatus );<br />

// Convert point from spherical to projected.<br />

Point3 projectedPt = sphereToProjected.Convert( sphericalPt,<br />

returnStatus );<br />

Point3 [] projectedPts = sphereToProjected.Convert( sphericalPts,<br />

returnStatus );<br />

// convert point from projected to spherical.<br />

Point3 sphericalPt = projectedToSphere.Convert( projectedPt,<br />

returnStatus );<br />

Point3 [] sphericalPts = projectedToSphere.Convert( projectedPts,<br />

returnStatus );<br />

Coordinate System Interface<br />

The Coordinate Systems interface, ICoordSys, provides properties of the coordinate<br />

system to the application developer. These include the coordinate systems name,<br />

description, surface and vertical units, and the engine specific unit domain. The unit<br />

domain is usually Spherical or Cartesian.<br />

The properties from the ICoordSys interface may be used to save the coordinate system<br />

information. This can be done by storing the values of the properties in an XML file, for<br />

example, for later retrieval and use. The ICoordSys interface provides access to the<br />

properties in a read only fashion. ICoordSys is defined as:<br />

public interface ICoordSys<br />

{<br />

string Description { get; }<br />

string Name { get; }<br />

IUnit NativeSurfaceUnit { get; }<br />

IUnit NativeVerticalUnit { get; }<br />

string UnitDomain { get; }<br />

}<br />

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

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

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

Saved successfully!

Ooh no, something went wrong!