Click or drag to resize

Polygon Constructor (String)

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Construct a Polygon from WKT.

Namespace:  Telogis.GeoBase.Geometry
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public Polygon(
	string wkt
)

Parameters

wkt
Type: SystemString
Well-known text (WKT) containing polygon geometry and, optionally, a value indicating a z level (that is, 'x y' without a Z level, or 'x y z' with)
Examples
C#
// Create a four sided polygon in San Diego, Ca.
Telogis.GeoBase.Geometry.Polygon myPolygonWKT = new Telogis.GeoBase.Geometry.Polygon(
"POLYGON((-117.169485 32.722237,-117.156160 32.722398,-117.156160 32.712340,-117.169611 32.712259,-117.169485 32.722237))"
);
Console.WriteLine("This polygon as WKT *without* the Z level is " + myPolygonWKT.WKT);
// Or with a Z level
Telogis.GeoBase.Geometry.Polygon myPolygonWKT_WithZ = new Telogis.GeoBase.Geometry.Polygon(
"POLYGON((-117.169485 32.722237 1,-117.156160 32.722398 2,-117.156160 32.712340 3,-117.169611 32.712259 2,-117.169485 32.722237 1))"
);
Console.WriteLine("This polygon as WKT *with* the Z level is " + myPolygonWKT_WithZ.WKTWithZ);
See Also