C# Class MapAround.Geometry.DistanceCalculator

Calculates a distances. This class allows to find the Euclidean distance between two plane geometries . Supports Points, MultiPoints, Polylines and Polygons. All other geometries, for example, the bounding rectangle or the line segment should be converted to these four.
Show file Open project: gkrsu/maparound.core

Public Methods

Method Description
EuclideanDistance ( IGeometry geometry1, IGeometry geometry2, double threshold ) : double

Calculates the Euclidean distance between two geometries.

MinimumEuclideanDistance ( IGeometry geometry1, IGeometry geometry2 ) : double

Computes the minimum Euclidean distance between two geometries.

Private Methods

Method Description
calculateDistanceBrutForce ( IGeometry geometry1, IGeometry geometry2, List points1, List points2, double threshold ) : double
calculateSegmentsPointsDistance ( List chains, List points, double minDistance, double threshold ) : double
checkGeometry ( IGeometry geometry ) : void
getGeometryChains ( IGeometry geometry ) : List
hasPointInside ( Polygon polygon, List points ) : bool

Method Details

EuclideanDistance() public static method

Calculates the Euclidean distance between two geometries.
public static EuclideanDistance ( IGeometry geometry1, IGeometry geometry2, double threshold ) : double
geometry1 IGeometry First geometry
geometry2 IGeometry Second geometry
threshold double The threshold value of the distance /// at which a search is terminated
return double

MinimumEuclideanDistance() public static method

Computes the minimum Euclidean distance between two geometries.
public static MinimumEuclideanDistance ( IGeometry geometry1, IGeometry geometry2 ) : double
geometry1 IGeometry First geometry
geometry2 IGeometry Second geometry
return double