tsc_LineDefinition

A tsc_LineDefinition is a class that defines a line for SurveyCore.  It contains the parameters required to store in the database as an observation and can be retrieved from existing database entities.

The definition contains enough information to query the line for locations and properties. 

The definition represents all types of supported lines and static construction methods are available to create lines.

The station values do not affect any coordinates in the line itself, they are optional and are useful when the line is used in stakeout, for instance.

Static Constructors

static tsc_LineDefinition CreateTwoPointLine (const tsc_CogoEnvironment& environment,

                                             const tsc_String&          startPointName,

                                             const tsc_String&          endPointName

                                             const double&              startStation = 0.0,

                                             const double&              stationIncrement = double_Null);


static tsc_LineDefinition CreateBearingAzimuthLine (const tsc_CogoEnvironment& environment,

                                                   const tsc_String&          startPointName,

                                                   const double&              azimuth,

                                                   const double&              length,

                                                   const double&              grade,

                                                   const double&              startStation = 0.0,

                                                   const double&              stationIncrement = double_Null);


static tsc_LineDefinition CreateTwoCoordinateLine (const tsc_CogoEnvironment& environment,

                                                   const tsc_Grid&          startPoint,

                                                   const tsc_Grid&          endPoint,

                                                   const double&            startStation = 0.0,

                                                   const double&            stationIncrement = double_Null);


Enumeration

enum tsc_LineMethod : int

{

    tslm_Unknown = 0,

    tslm_TwoPoint,

    tslm_BearingDistance,

    tslm_TwoCoordinate

};


Methods

tsc_LineMethod GetMethod();
Returns the creation method of the line.

tsc_Grid CalculateStart();
Calculates a grid coordinate for the start of the line.

tsc_Grid CalculateEnd();
Calculates a grid coordinate for the end of the line.

tsc_Grid CalculateMidPoint();
Calculates a grid coordinate for the middle of the line.

tsc_String GetStartPointName();
Retrieves the start point name.  (Empty for a two-coordinate line).

tsc_String GetEndPointName();
Retrieves the end point name (may be empty for a bearing & azimuth or two-coordinate line).

tsc_Point GetStartPoint();
Retrieves the start point if it came from the database (not calculated).

tsc_Point GetEndPoint();
Retrieves the end point if it came from the database (not calculated and may not exist for bearing & azimuth lines).

double GetAzimuth();
Calculates the azimuth of the line in radians.

double GetLength();
Calculates the length of the line in meters.

double GetGrade();
Calculates the grade of the line in radians.

tsc_CogoEnvironment GetEnvironment();
Obtains the cogo settings used to calculate the line, alternatively if the line was loaded from a database then this represents the database Cogo environment at the time of retrieval.

double GetStartStation();
Retrieves the stationing value at the start point.

double GetStationIncrement();
Retrieves the stationing increment distance.