ExportCoordSysToStrings Method

[VB6]

Function ExportCoordSysToStrings(coordSys As ICoordSys, systemString As String, datumString As String, unitString As String) As Boolean

[Delphi 7]

function ExportCoordSysToStrings(const coordSys: ICoordSys; out systemString: WideString; out datumString: WideString; out unitString: WideString): WordBool;

 

Description

The ExportCoordSysToStrings method produces the keys that would identify the specified ICoordSys in GeoCalc v5.x.  The system key identifies the type of the ICoordSys, and, if applicable, the Projection used by the ICoordSys.  The datum key identifies the HorizontalDatum used by the ICoordSys.  The units key identifies the units used to express the location of ICoordPoints in the ICoordSys.  Not all ICoordSys objects can be represented as a set of GeoCalc v5.x keys, because more types of Projections are available in GeoCalc v6.x than were available in GeoCalc v5.x.  If the specified ICoordSys cannot be represented as a set of keys, then this method will return false.

 

Example

[VB6]

Sub DataSource_ExportCoordSysToStrings(data As DataSource)

    Dim cs As ICoordSys

    Dim systemKey As String

    Dim datumKey As String

    Dim unitsKey As String

    

    Set cs = data.GetProjectedCoordSys("BMG", "UTM-19N")

    

    If Not data.ExportCoordSysToStrings(cs, systemKey, datumKey, unitsKey) Then

        MsgBox ("Unable to describe the CoordSys with GeoCalc 5.x keys")

    End If

End Sub

 

[Delphi 7]

procedure DataSource_ExportCoordSysToStrings(data : DataSource);

var

  cs : ICoordSys;

  systemKey : WideString;

  datumKey : WideString;

  unitsKey : WideString;

begin

  cs := data.GetProjectedCoordSys('BMG', 'UTM-19N');

  if not data.ExportCoordSysToStrings(cs, systemKey, datumKey, unitsKey) then

  begin

    ShowMessage('Unable to describe the coordinate system with GeoCalc 5.x keys');

  end;

end;