GeoFence Class

The GeoFence class is used to help check if points/coordinates are inside or near a specified polygon/polyline,

Definition

Namespace: CoordinateSharp
Assembly: CoordinateSharp (in CoordinateSharp.dll) Version: 3.1.1.1
XMLNS for XAML: Not mapped to an xmlns.
C#
[SerializableAttribute]
public class GeoFence
Inheritance
Object    GeoFence

Constructors

GeoFence(ListCoordinate) Create a GeoFence using a list of coordinates A GeoFence can be either a series of lines or polygons.
GeoFence(ListGeoFencePoint) Create a GeoFence using a list of points. A GeoFence can be either a series of lines or polygons.

Properties

Points Provides a List of Points contained within the drawn GeoFence.

Methods

ClosePolygon Closes and Completes the polygon shape ensure the first and last points are identical.
Densify(Distance) Densifies the polygon by adding additional points along each edge at specified intervals using ellipsoidal (Vincenty) logic.
Densify(Distance, Earth_Ellipsoid) Densifies the polygon by adding additional points along each edge at specified intervals using ellipsoidal (Vincenty) logic with a user specified earth shape.
Densify(Distance, Shape) Densifies the polygon by adding additional points along each edge at specified intervals.
DistanceFromNearestPolyLine Gets distance from nearest polyline in shape
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GeoJsonPolygonBuilder(GeoFence) Builds a GeoJSON representation of a polygon with a single outer boundary (fence). This method is a simplified version that creates GeoJSON without any inner fences (holes).
GeoJsonPolygonBuilder(GeoFence, ListGeoFence) Builds a GeoJSON representation of a polygon with an outer boundary (fence) and optional inner boundaries (fences). The method ensures that the outer fence is right-handed (counterclockwise) and inner fences are left-handed (clockwise), following GeoJSON conventions for polygons and holes.
GetCentroid Returns the central point of the polygon.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
IsPointInPolygon Determine if the coordinate is inside the polygon.
IsPointInRangeOfLine(Coordinate, Distance) Determine if the coordinate is next the given range of the polyline.
IsPointInRangeOfLine(Coordinate, Double) Determine if a coordinate is next to the given range (in meters) of the polyline.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
OrderPoints_LeftHanded Orders the points of the GeoFence to be left-handed (clockwise). This method is typically used for inner boundaries (holes) in a polygon, following the GeoJSON specification, where holes are represented with left-handed (clockwise) orientation.
OrderPoints_RightHanded Orders the points of the GeoFence to be right-handed (counterclockwise). This method is typically used for the outer boundary of a polygon, following the GeoJSON specification, where the outer boundary is represented with right-handed (counterclockwise) orientation.
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also