Search Results for

    Show / Hide Table of Contents

    Class CoordinateSequenceComparator

    Compares two CoordinateSequences.

    Inheritance
    object
    CoordinateSequenceComparator
    Implements
    IComparer<CoordinateSequence>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Geometries
    Assembly: NetTopologySuite.dll
    Syntax
    public class CoordinateSequenceComparator : IComparer<CoordinateSequence>
    Remarks

    For sequences of the same dimension, the ordering is lexicographic. Otherwise, lower dimensions are sorted before higher. The dimensions compared can be limited; if this is done ordinate dimensions above the limit will not be compared.

    If different behaviour is required for comparing size, dimension, or coordinate values, any or all methods can be overridden.

    Constructors

    | Edit this page View Source

    CoordinateSequenceComparator()

    Creates a comparator which will test all dimensions.

    Declaration
    public CoordinateSequenceComparator()
    | Edit this page View Source

    CoordinateSequenceComparator(int)

    Creates a comparator which will test only the specified number of dimensions.

    Declaration
    public CoordinateSequenceComparator(int dimensionLimit)
    Parameters
    Type Name Description
    int dimensionLimit

    The number of dimensions to test

    Fields

    | Edit this page View Source

    DimensionLimit

    The number of dimensions to test

    Declaration
    protected int DimensionLimit
    Field Value
    Type Description
    int

    Methods

    | Edit this page View Source

    Compare(CoordinateSequence, CoordinateSequence)

    Compares two CoordinateSequences for relative order.

    Declaration
    public int Compare(CoordinateSequence s1, CoordinateSequence s2)
    Parameters
    Type Name Description
    CoordinateSequence s1

    A coordinate sequence

    CoordinateSequence s2

    A coordinate sequence

    Returns
    Type Description
    int

    -1, 0, or 1 depending on whether s1 is less than, equal to, or greater than s2

    | Edit this page View Source

    Compare(double, double)

    Compare two doubles, allowing for NaN values. NaN is treated as being less than any valid number.

    Declaration
    public static int Compare(double a, double b)
    Parameters
    Type Name Description
    double a

    A double

    double b

    A double

    Returns
    Type Description
    int

    -1, 0, or 1 depending on whether a is less than, equal to or greater than b

    | Edit this page View Source

    Compare(object, object)

    Compares two CoordinateSequences for relative order.

    Declaration
    public int Compare(object o1, object o2)
    Parameters
    Type Name Description
    object o1

    A coordinate sequence

    object o2

    A coordinate sequence

    Returns
    Type Description
    int

    -1, 0, or 1 depending on whether o1 is less than, equal to, or greater than o2

    | Edit this page View Source

    CompareCoordinate(CoordinateSequence, CoordinateSequence, int, int)

    Compares the same coordinate of two CoordinateSequences

    Declaration
    protected int CompareCoordinate(CoordinateSequence s1, CoordinateSequence s2, int i, int dimension)
    Parameters
    Type Name Description
    CoordinateSequence s1

    A coordinate sequence

    CoordinateSequence s2

    A coordinate sequence

    int i

    The index of the coordinate to test

    int dimension

    the number of dimensions to test

    Returns
    Type Description
    int

    Implements

    IComparer<T>
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX