Class Property

Type

GeoCalcNET.CoordPoint.ClassType

 

Access

Get only

 

Description

The class property indicates the type of an instance of CoordPoint.  Point objects will often be cast as CoordPoints when passed to or returned by methods and properties in GeoCalcNET.  In order to cast the CoordPoint back to its specific type, use this property to verify the type to which the CoordPoint should be cast.  

 

Example

[VB]

Private Sub GeoCalcNET_CoordPoint_Class(ByVal pt As GeoCalcNET.CoordPoint)

If pt.Class = GeoCalcNET.CoordPoint.ClassType.Cartesian Then

Dim cpt As GeoCalcNET.CartesianPoint = pt

ElseIf pt.Class = GeoCalcNET.CoordPoint.ClassType.Geodetic Then

Dim gpt As GeoCalcNET.GeodeticPoint = pt

ElseIf pt.Class = GeoCalcNET.CoordPoint.ClassType.Projected Then

Dim ppt As GeoCalcNET.ProjectedPoint = pt

End If

End Sub

 

[C#]

private void GeoCalcNET_CoordPoint_Class(GeoCalcNET.CoordPoint pt)

{

switch(pt.Class)

{

case GeoCalcNET.CoordPoint.ClassType.Cartesian :

GeoCalcNET.CartesianPoint cpt = (GeoCalcNET.CartesianPoint)pt;

break;

case GeoCalcNET.CoordPoint.ClassType.Geodetic :

GeoCalcNET.GeodeticPoint gpt = (GeoCalcNET.GeodeticPoint)pt;

break;

case GeoCalcNET.CoordPoint.ClassType.Projected :

GeoCalcNET.ProjectedPoint ppt = (GeoCalcNET.ProjectedPoint)pt;

break;

}

}