Click or drag to resize

Polygon Constructor (LineString)

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Construct a polygon from one or more LineStrings.

Namespace:  Telogis.GeoBase.Geometry
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public Polygon(
	params LineString[] rings
)

Parameters

rings
Type: Telogis.GeoBase.GeometryLineString
The Rings the polygon is composed of. The first LineString is the OuterRing, all others are InnerRings. See Polygon for more information on how to represent various polygon types.
Remarks
A polygon must contain at least four points, creating the simplest polygon: a triangle. The first and last points must be equal.
Examples
C#
// Create a four sided polygon in San Diego, Ca.
Telogis.GeoBase.Geometry.Polygon myPolygon = new Telogis.GeoBase.Geometry.Polygon(
    new Telogis.GeoBase.Geometry.LineString[] {
        new Telogis.GeoBase.Geometry.LineString(
        new Telogis.GeoBase.LatLon(32.722237,-117.169485),
        new Telogis.GeoBase.LatLon(32.722398,-117.156160),
        new Telogis.GeoBase.LatLon(32.712340,-117.156160),
        new Telogis.GeoBase.LatLon(32.712259,-117.169611),
        new Telogis.GeoBase.LatLon(32.722237,-117.169485))
    }
);
See Also