Click or drag to resize

LineStringItem Property

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Gets the nth point from this LineString.

Namespace:  Telogis.GeoBase.Geometry
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public LatLon this[
	int n
] { get; set; }

Parameters

n
Type: SystemInt32
The index of the point on this LineString. The index is zero-based.

Return Value

Type: LatLon
The nth point in this LineString.
Examples
C#
// Create a LineString
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)}
);
// zero-based, so first item is '0'
int n = 0;
Console.WriteLine("First point is {0}", newLine[n]);
n = 2;
Console.WriteLine("Third point is {0}", newLine[n]);
// First point is 33.594096,-117.741204
// Third point is 33.582902,-117.725361
See Also