namespace Core.GIS.NetTopologySuite.GeometriesGraph
{
///
///
///
public enum Positions
{
///
/// An indicator that a Location is on a GraphComponent (0)
///
On = 0,
///
/// An indicator that a Location is to the left of a GraphComponent (1)
///
Left = 1,
///
/// An indicator that a Location is to the right of a GraphComponent (2)
///
Right = 2,
///
/// An indicator that a Location is is parallel to x-axis of a GraphComponent (-1)
/// ///
Parallel = -1,
}
///
/// A Position indicates the position of a Location relative to a graph component
/// (Node, Edge, or Area).
///
public class Position
{
///
/// Returns Positions.Left if the position is Positions.Right,
/// Positions.Right if the position is Left, or the position
/// otherwise.
///
///
public static Positions Opposite(Positions position)
{
if (position == Positions.Left)
{
return Positions.Right;
}
if (position == Positions.Right)
{
return Positions.Left;
}
return position;
}
}
}