ILineString

A linestring is a geometry that has a dimension of 1. In addition to other properties inherited from IGeometry, linestrings have length. A linestring is a ring if its first and last points are the same.

 

 

Properties

 

Dimension

Gets the dimension of the geometry object. (Inherited from IGeometry)

EndPoint

An IPoint representing the end point of the line string.

Envelope

Gets the linestring’s bounding box. (Inherited from IGeometry)

GeometryType

Gets the geometry type ID. (Inherited from IGeometry)

GeometryTypeStr

Gets a string representation of the geometry type. (Inherited from IGeometry)

Length

Gets the linestring’s length.

NumPoints

Gets the number of points in the linestring.

Points

An IPoints representing the points in the linestring.

SpatialOperator

An ISpatialOperator representing the linestring’s interaction with another geometry object. (Inherited from IGeometry)

SpatialRelation

An ISpatialRelation that tests the linestring’s spatial relationship with other geometries. (Inherited from IGeometry)

StartPoint

An IPoint representing the start point of the line string.

Value

Gets the IPoint element in the specified zero-based index of the linestring. .

Wks

An IWks representing methods for transferring coordinate system information (WKT and WKB). (Inherited from IGeometry))

 

Methods

 

Clone

Creates an exact copy of the selected linestring. (Inherited from IGeometry)

EndEdit

Terminates the edit item mode. (Inherited from IGeometry)

IsClosed

Returns TRUE if the line string is closed, such that the first and last points are the same.

IsEmpty

Returns whether or not the set of points in the linestring is empty. (Inherited from IGeometry)

IsSimple

Returns whether or not the linestring is simple. A linestring is simple if it does not intersect itself. (Inherited from IGeometry)

SetEmpty

Removes all points from this linestring. (Inherited from IGeometry)

StartEdit

Starts the edit item mode. (Inherited from IGeometry)

Length

Gets the length of the linestring.

 

JavaScript

 

Length

 

C#

 

double Length { get; }

 

C++

 

HRESULT Length([out, retval] double* dLength)

NumPoints

Gets the number of points in the linestring.

 

JavaScript

 

NumPoints

 

C#

 

int NumPoints { get; }

 

C++

 

HRESULT NumPoints([out, retval] long* NumPoints)

Value

Gets the IPoint element in the specified zero-based index of the linestring. This property is exposed in C# and JavaScript in the following ways:

§   In C#, this property is exposed as Value, e.g.,

ILineString myLineString;

IPoint thisPoint = myLineString.Value[0];

Note:    In older versions of C#, this property is exposed as get_Value, e.g.,

ILineString myLineString;

IPoint thisPoint = myLineString.get_Value[0];

§   In JavaScript use:

var myLineString;

var thisPoint = myLineString.Value(0);

 

JavaScript

 

Value(

       t,

       p)

 

C#

 

IPoint Value {get;}

 

C++

 

HRESULT Value(

       double t,

       [out, retval] IPoint** p)

IsClosed

If the linestring is closed (forming a linear ring), this method returns the Boolean TRUE.

 

JavaScript

 

IsClosed(

       IsClosed)

 

C#

 

void IsClosed(

       bool IsClosed)

 

C++

 

HRESULT IsClosed(

       [out, retval] VARIANT_BOOL* IsClosed)

Parameters

IsClosed

A Boolean that returns TRUE if the linestring is closed.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.