Click or drag to resize

LineString Class

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
A geometric line described by a string of points.
Inheritance Hierarchy

Namespace:  Telogis.GeoBase.Geometry
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public class LineString : Geometry

The LineString type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyCode exampleBoundingBox
Return the minimum-sized BoundingBox encapsulating all the points on this LineString.
(Overrides GeometryBoundingBox.)
Public propertyCode exampleFirstPoint
The first point of this LineString.
Public propertyCode exampleIsLoop
Returns true of this LineString forms a connected loop. A loop has at least 4 points, where the first and last points are equal.
Public propertyCode exampleItem
Gets the nth point from this LineString.
Public propertyLastPoint
The last point of this LineString.
Public propertyCode exampleLength
The number of points in this LineString.
Public propertyCode examplePoints
Gets/sets an array of LatLons.
Public propertyCode exampleReverse
Returns a LineString with the points in the opposite order to this LineString.
Public propertyCode exampleWKT
Returns this LineString in WKT string format.
(Overrides GeometryWKT.)
Public propertyCode exampleWKTWithZ
Returns this LineString in WKT string format with Z level.
Top
Methods
  NameDescription
Public methodCode exampleAdd
Add the given point to the end of the LineString.
Public methodDistanceTo(LatLon)
Calculates the shortest distance from the given point to this LineString.
Public methodDistanceTo(LatLon, Int32)
Calculates the shortest distance (in degrees) from the given point to this LineString.
Public methodDistanceTo(LatLon, DistanceUnit)
Calculates the shortest distance from the given point to this LineString.
Public methodDistanceTo(LatLon, Int32, DistanceUnit)
Calculates the shortest distance (in degrees) from the given point to this LineString.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodCode exampleGetEnumerator
Enumerate all points in the line string.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodCode exampleLineLength
Calculate the length of this LineString in the specified DistanceUnits.
Public methodPercentAlong
Returns the distance that loc is from the start of the linestring, as a percentage.
Public methodPythagoreanDistanceTo Obsolete.
Public methodQuickDistanceTo
Calculates the distance (in degrees) from the given point to this LineString.
Public methodSubstring
Gets a LineString that is a sub-string of the current LineString.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Examples
C#
// Create a LineString from an array of four <see cref="T:Telogis.GeoBase.LatLon" /> points
Telogis.GeoBase.Geometry.LineString newLine = new Telogis.GeoBase.Geometry.LineString(
    new Telogis.GeoBase.LatLon[] {
        new Telogis.GeoBase.LatLon(33.594096,-117.741204),
        new Telogis.GeoBase.LatLon(33.594195,-117.726176),
        new Telogis.GeoBase.LatLon(33.582902,-117.725361),
        new Telogis.GeoBase.LatLon(33.582953,-117.740873)}
);
See Also