Creates a polygon.
JavaScript |
|
CreatePolygonGeometry( ExteriorRing, interiorRingList) |
C# |
|
IPolygon CreatePolygonGeometry( object ExteriorRing, [object interiorRingList = 0]) |
C++ |
|
HRESULT CreatePolygonGeometry( VARIANT ExteriorRing, VARIANT interiorRingList, IPolygon** pVal) |
Parameters
ExteriorRing
Any of the following geometries can be passed as the ExteriorRing parameter:
· ILinearRing
· LinearRing WKT
See: “Well-Known Text and Well-Known Binary (WKT and WKB) Well-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 ITerrain66 interface to retrieve information about the coordinate system.
Note: As of IE11, VBScript which includes the VBArray object that returns a SafeArray, is considered deprecated. In order to continue using this TerraExplorer API using JavaScript, add the following meta tag in the head section, to enable you to choose which version of Internet Explorer the HTML page should be rendered in (in this case IE10):
<meta http-equiv="X-UA-Compatible" content="IE=10" />
interiorRingList
An array of rings of the following types:
· ILinearRing
· LinearRing WKT
See: “Well-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 ITerrain66 interface to retrieve information about the coordinate system.
Note: As of IE11, VBScript which includes the VBArray object that returns a SafeArray, is considered deprecated. In order to continue using this TerraExplorer API using JavaScript, add the following meta tag in the head section, to enable you to choose which version of Internet Explorer the HTML page should be rendered in (in this case IE10):
<meta http-equiv="X-UA-Compatible" content="IE=10" />
· An array of IPosition66 objects.
Return Value
pVal
An IPolygon representing the created polygon
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.