GeoMultiPolygon Class

A set of polygons, such as a country and its islands.

public sealed class GeoMultiPolygon : GeoGeometry
Inheritance
GeoGeometry GeoMultiPolygon

Constructors

NameDescription
GeoMultiPolygon(IEnumerable<GeoPolygon>)Initializes a new instance of the GeoMultiPolygon class.

GeoMultiPolygon(IEnumerable<GeoPolygon>)

GeoMultiPolygon.cs

Initializes a new instance of the GeoMultiPolygon class.

public GeoMultiPolygon(IEnumerable<GeoPolygon> polygons)

Parameters

polygons IEnumerable<GeoPolygon>
The polygons.

Properties

NameDescription
PolygonsGets the polygons.
TypeGets the type of the geometry.

Gets the polygons.

public IReadOnlyList<GeoPolygon> Polygons { get; }

Gets the type of the geometry.

public override GeoGeometryType Type { get; }

Property value

GeoGeometryType

Methods

NameDescription
Contains(GeoPosition)Gets a value that indicates whether a position is inside one of the polygons. See GeoPolygon.Contains.
Contains(GeoPosition, GeoEdgeType)Gets a value that indicates whether a position is inside one of the polygons, whose edges are drawn as an edge type says. See GeoPolygon.Contains.
GetPositions()Gets the positions of the geometry: every position of every point, line and ring, in order.

Contains overloads

Contains(GeoPosition)

GeoMultiPolygon.cs

Gets a value that indicates whether a position is inside one of the polygons. See GeoPolygon.Contains.

public bool Contains(GeoPosition position)
Parameters
position GeoPosition
The position. The altitude is ignored.
Returns

bool true when the position is inside one of the polygons; otherwise, false.

Contains(GeoPosition, GeoEdgeType)

GeoMultiPolygon.cs

Gets a value that indicates whether a position is inside one of the polygons, whose edges are drawn as an edge type says. See GeoPolygon.Contains.

public bool Contains(GeoPosition position, GeoEdgeType edgeType)
Parameters
position GeoPosition
The position. The altitude is ignored.
edgeType GeoEdgeType
How the edges are drawn.
Returns

bool true when the position is inside one of the polygons; otherwise, false.

GetPositions()

GeoMultiPolygon.cs

Gets the positions of the geometry: every position of every point, line and ring, in order.

public override IEnumerable<GeoPosition> GetPositions()

Returns

IEnumerable<GeoPosition> The positions.