Sub CCGridDirect(refPoint As IGeodeticPoint, LocationString As String, contactPoint As IGeodeticPoint)
procedure CCGridDirect(const refPoint: IGeodeticPoint; const LocationString: WideString; const contactPoint: IGeodeticPoint);
The CCGridDirect method calculates the coordinates of the point whose position is described relative to a reference point. The method accepts three arguments, the first of which is the reference point. The second argument is a string that uses the Cartesian Coordinate Grid (CCG) system to describe the location of the desired point relative to the reference point. The location of the calculated point is stored in the third argument.
If a three-dimensional GeodeticPoint is used, this method will ignore the Height coordinate on the input point. The Height of the point will be assumed to be 0, so that the calculations occur on the surface of the Ellipsoid. The Height of the output point will be equal to the Height of the input point.
Sub Ellipsoid_CCGridDirect(ell As Ellipsoid)
Dim referencePt As New GeodeticPoint
Dim contactPt As New GeodeticPoint
Dim ccgString As String
referencePt.Longitude.InDegrees = -76
referencePt.latitude.InDegrees = 45
ccgString = "R040/000"
ell.CCGridDirect referencePt, ccgString, contactPt
End Sub
procedure Ellipsoid_CCGridDirect(ell : Ellipsoid);
var
referencePt : GeodeticPoint;
contactPt : GeodeticPoint;
ccgString : WideString;
begin
referencePt := CoGeodeticPoint.Create;
referencePt.Longitude.InDegrees := -76;
referencePt.Latitude.InDegrees := 45;
ccgString := 'R040/000';
ell.CCGridDirect(referencePt, ccgString, contactPt);
end;