CreateLinearRingGeometry

Creates a linear ring. A linear ring closes itself automatically on every AddPoint/DeletePoint by adding a copy of the first point as the last point.

 

JavaScript

 

CreateLinearRingGeometry(

       Vertices)

 

C#

 

ILinearRing CreateLinearRingGeometry(

       object Vertices)

 

C++

 

HRESULT CreateLinearRingGeometry(

       VARIANT Vertices,

       ILinearRing** pVal)

 

Parameters

Vertices

Any of the following can be passed:

·          LinearRing WKT
SeeWell-KnownText Representation for Geometric Objects” in the “Overview” chapter for background information on WKT and WKB.

·          A Safe Array of Vertices– An array that contains triplets of doubles. Each triplet is composed of an x-coordinate, a y-coordinate, and a height. The height is represented in meters and the x- and y-coordinates are represented in the coordinate system’s units. You can use the ITerrain80 interface to retrieve information about the coordinate system.

Note:    In creating a closed ring (polygon), the first point (vertex) should also be listed as the last point.

Note:    In JavaScript, use the VBArray object. E.g.,

var points = geom.Points.ToArray()

var arr = new VBArray(points).toArray();

Return Value

pVal

An ILinearRing object representing the created object.

Exceptions

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