Show / Hide Table of Contents

Class GeoLine

Handling of a geographical line (geo-line) defined by a start and end GeoCoordinate

Inheritance
System.Object
GeoMapElement
GeoLine
Implements
IGeoMapElement
Inherited Members
GeoMapElement.UniqueId
GeoMapElement.Color
GeoMapElement.Thickness
GeoMapElement.Name
GeoMapElement.Description
GeoMapElement.DataList
GeoMapElement.AddDataList(String, String)
GeoMapElement.AssignProperties(MapObjectProperties)
GeoMapElement.Draw()
Namespace: FpAssistantCore.Geographical
Assembly: FpAssistantCoreScl.dll
Syntax
public class GeoLine : GeoMapElement, IGeoMapElement

Constructors

View Source

GeoLine(GeoCoordinate, GeoCoordinate)

Constructor to initialise with two coordinates to define a geographical line

Declaration
public GeoLine(GeoCoordinate startCoordinate, GeoCoordinate endCoordinate)
Parameters
Type Name Description
GeoCoordinate startCoordinate

geographical coordinate of the start of the line

GeoCoordinate endCoordinate

geographical coordinate of the end of the line

View Source

GeoLine(GeoCoordinate, GeoCoordinate, LinearDistance, LinearDistance, MapObjectProperties)

Constructor to initialise with two coordinates to define a geographical line with elevations

Declaration
public GeoLine(GeoCoordinate startCoordinate, GeoCoordinate endCoordinate, LinearDistance startElevation, LinearDistance endElevation, MapObjectProperties mapObjectProperties)
Parameters
Type Name Description
GeoCoordinate startCoordinate

geographical coordinate of the start of the line

GeoCoordinate endCoordinate

geographical coordinate of the end of the line

LinearDistance startElevation

Distance for the elevation of the start point

LinearDistance endElevation

Distance for the elevation of the end point

MapObjectProperties mapObjectProperties

Default values of map element properties, NULL can be passed

View Source

GeoLine(GeoCoordinate, GeoCoordinate, MapObjectProperties)

Constructor to initialise with two coordinates to define a geographical line

Declaration
public GeoLine(GeoCoordinate startCoordinate, GeoCoordinate endCoordinate, MapObjectProperties mapObjectProperties)
Parameters
Type Name Description
GeoCoordinate startCoordinate

geographical coordinate of the start of the line

GeoCoordinate endCoordinate

geographical coordinate of the end of the line

MapObjectProperties mapObjectProperties

Default values of map element properties, NULL can be passed

View Source

GeoLine(GeoCoordinateElevation, GeoCoordinateElevation)

Constructor to initialise with two coordinates to define a geographical line with elevations

Declaration
public GeoLine(GeoCoordinateElevation startCoordinate, GeoCoordinateElevation endCoordinate)
Parameters
Type Name Description
GeoCoordinateElevation startCoordinate

geographical coordinate of the start of the line with elevation

GeoCoordinateElevation endCoordinate

geographical coordinate of the end of the line with elevation

Properties

View Source

Distance

Property to access the distance of the geographical line

Declaration
public LinearDistance Distance { get; }
Property Value
Type Description
LinearDistance

Geodectic distance of the line

Remarks

This calculation will ignore any elevation values assign to this object

View Source

EndCoordinate

Access to the end coordinate of the geoline object

Declaration
public GeoCoordinate EndCoordinate { get; set; }
Property Value
Type Description
GeoCoordinate

End coordinate of the geo-line

View Source

EndElevation

Access to the end coordinates elevation

Declaration
public LinearDistance EndElevation { get; set; }
Property Value
Type Description
LinearDistance

Elevation of the end coordinate

View Source

ForwardAzimuth

Forward azimuth value of the GeoLine object

Declaration
public CompassBearing ForwardAzimuth { get; }
Property Value
Type Description
CompassBearing

Angle of the forward azimuth

Remarks

The line direction is from the StartCoordinate to the EndCoordinate

View Source

ReverseAzimuth

Reverse azimuth value of the GeoLine object

Declaration
public CompassBearing ReverseAzimuth { get; }
Property Value
Type Description
CompassBearing

Angle of the reverse azimuth

Remarks

The line direction is from the StartCoordinate to the EndCoordinate

View Source

StartCoordinate

Access to the first coordinate of the geoline object

Declaration
public GeoCoordinate StartCoordinate { get; set; }
Property Value
Type Description
GeoCoordinate

Start coordinate of the geo-line

View Source

StartElevation

Access to the first coordinates elevation, start point

Declaration
public LinearDistance StartElevation { get; set; }
Property Value
Type Description
LinearDistance

Elevation of the first coordinate

Methods

View Source

AsGeography(IFormatProvider)

Creates a geography type LINESTRING()

Declaration
public string AsGeography(IFormatProvider provider)
Parameters
Type Name Description
IFormatProvider provider

Globalization culture to be applied to numbers

Returns
Type Description
System.String

String of the geography

Remarks

LINESTRING( StartLongitude StartLatitude, EndLongitude EndLatitude) / LINESTRING(-122.360 47.656, -122.343 47.656) - Altitude is in metres and the measure is set to 0

View Source

AsGmlPosList(GmlDimension, IFormatProvider)

Creates a value for GML posList element

Declaration
public string AsGmlPosList(GmlDimension gmlDimension, IFormatProvider provider)
Parameters
Type Name Description
GmlDimension gmlDimension

Determine if the GML output is required to be 2D or 3D coordinate values

IFormatProvider provider

Globalization culture to be applied to numbers

Returns
Type Description
System.String

String of the GML PosList element value

View Source

Intersection(GeoLine, ref GeoCoordinate)

Computes the intersection, if any, of two GeoLine objects on a sphere

Declaration
public bool Intersection(GeoLine geoLine2, ref GeoCoordinate intersectionCoordinate)
Parameters
Type Name Description
GeoLine geoLine2

Second GeoLine used to compute any intersections

GeoCoordinate intersectionCoordinate

By reference, the computed intersection

Returns
Type Description
System.Boolean

True is successfull, otherwise false

Remarks

Parameter geoLine2 must not be null, otherwise ArgumentNullException will be thrown

Implements

IGeoMapElement
  • View Source
In This Article
Back to top Copyright 2018-2024 CADology Limited