IGeometryCreator
This interface provides methods for creating geometries and geometry collections.
|
Methods |
|
|
Creates a geometry from the object’s Well-Known Binary representation. |
|
|
Creates a geometry based on the Well-Known Text representation for the geometry object. |
|
|
Creates a linear ring. |
|
|
Creates a line string object. |
|
|
Creates a geometry made up of multiple line strings. |
|
|
CreateMultiPointGeometry |
Reserved. Currently not used. |
|
Creates a geometry made up of multiple polygons. |
|
|
Creates a point. |
|
|
Creates a polygon. |
CreateGeometryFromWKB
Creates a geometry from the object’s Well-Known Binary representation. See “Well-Known Text Representation for Geometric Objects” in the “Overview” chapter for background information on WKB. The created geometry always includes Z values even if they weren't present in the WKB.
JavaScript |
|
CreateGeometryFromWKB( buffer) |
C# |
|
IGeometry CreateGeometryFromWKB( object buffer) |
C++ |
|
HRESULT CreateGeometryFromWKB( VARIANT buffer, IGeometry** pVal) |
Parameters
buffer
The buffer containing the Well-Known Binary representation for the geometry object.
Return Value
pVal
An IGeometry representing the newly created geometry.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
CreateGeometryFromWKT
Creates a geometry based on the Well-Known Text representation for the geometry object. See “Well-Known Text and Well-Known Binary (WKT and WKB)” in the “Overview” chapter for background information on WKT. The created geometry always includes Z values even if they weren't present in the WKT.
JavaScript |
|
CreateGeometryFromWKT( buffer) |
C# |
|
IGeometry CreateGeometryFromWKT( string buffer) |
C++ |
|
HRESULT CreateGeometryFromWKT( BSTR buffer, IGeometry** pVal) |
Parameters
buffer
The buffer containing the Well-Known Text representation for the geometry object.
Return Value
pVal
An IGeometry representing the newly created geometry.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
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
See “Well-Known Text 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.
CreateLineStringGeometry
Creates a line string object.
JavaScript |
|
CreateLineStringGeometry( Vertices) |
C# |
|
ILineString CreateLineStringGeometry( object Vertices) |
C++ |
|
HRESULT CreateLineStringGeometry( VARIANT Vertices, ILineString** pVal) |
Parameters
Vertices
Any of the following can be passed:
· LineString WKB
· LineString WKT
See “Well-Known Text 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 JavaScript, use the VBArray object. E.g.,
var points = geom.Points.ToArray()
var arr = new VBArray(points).toArray();
Return Value
pVal
An ILineString object representing the linestring.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
CreateMultiLineStringGeometry
Creates a geometry made up of multiple line strings.
JavaScript |
|
CreateMultiLineStringGeometry( lineStringList) |
C# |
|
IMultiLineString CreateMultiLineStringGeometry( [object lineStringList = 0]) |
C++ |
|
HRESULT CreateMultiLineStringGeometry( VARIANT lineStringList, IMultiLineString** pVal) |
Parameters
lineStringList
An array of the following:
· LinearRing WKB
· LinearRing WKT
See “Well-Known Text 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 JavaScript, use the VBArray object. E.g.,
var points = geom.Points.ToArray()
var arr = new VBArray(points).toArray();
· ILineString
Return Value
pVal
An IMultiLineString representing the newly created geometry.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
CreateMultiPolygonGeometry
Creates a geometry made up of multiple polygons.
JavaScript |
|
CreateMultiPolygonGeometry( polygonList) |
C# |
|
IMultiPolygon CreateMultiPolygonGeometry( object polygonList) |
C++ |
|
HRESULT CreateMultiPolygonGeometry( VARIANT polygonList, IMultiPolygon** pVal) |
Parameters
polygonList
An array of the following geometries:
· ILinearRing
· IPolygon
· The LinearRing WKB
· The LinearRing WKT
See “Well-Known Text 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 JavaScript, use the VBArray object. E.g.,
var points = geom.Points.ToArray()
var arr = new VBArray(points).toArray();
Return Value
pVal
An IMultiPolygon representing the newly created geometry.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
CreatePointGeometry
Creates a point.
JavaScript |
|
CreatePointGeometry( point) |
C# |
|
IPoint CreatePointGeometry( object point) |
C++ |
|
HRESULT CreatePointGeometry( VARIANT point, IPoint** pVal) |
Parameters
point
Any of the following geometries can be passed as the point parameter:
· The Point WKB
· The Point WKT
See “Well-Known Text Representation for Geometric Objects” in the “Overview” chapter for background information on WKT and WKB.
· A Safe Array of Vertices– An array that contains one triplet of doubles. The 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 JavaScript, use the VBArray object. E.g.,
var points = geom.Points.ToArray()
var arr = new VBArray(points).toArray();
Return Value
pVal
An IPoint representing the newly created point.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
CreatePolygonGeometry
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 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 JavaScript, use the VBArray object. E.g.,
var points = geom.Points.ToArray()
var arr = new VBArray(points).toArray();
interiorRingList
An array of rings of the following types:
· ILinearRing
· LinearRing WKT
See “Well-Known Text 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 JavaScript, use the VBArray object. E.g.,
var points = geom.Points.ToArray()
var arr = new VBArray(points).toArray();
Return Value
pVal
An IPolygon representing the created polygon
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.