Search Results for

    Show / Hide Table of Contents

    Class GeometryItemDistance

    An IItemDistance<T, TItem> function for items which are Geometry using the Distance(Geometry) method.

    To make this distance function suitable for using to query a single index tree, the distance metric is anti-reflexive. That is, if the two arguments are the same Geometry object, the distance returned is MaxValue.
    Inheritance
    object
    GeometryItemDistance
    Implements
    IItemDistance<Envelope, Geometry>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Index.Strtree
    Assembly: NetTopologySuite.dll
    Syntax
    public class GeometryItemDistance : IItemDistance<Envelope, Geometry>

    Methods

    | Edit this page View Source

    Distance(IBoundable<Envelope, Geometry>, IBoundable<Envelope, Geometry>)

    Computes the distance between two Geometry items, using the Distance(Geometry) method.

    Declaration
    public double Distance(IBoundable<Envelope, Geometry> item1, IBoundable<Envelope, Geometry> item2)
    Parameters
    Type Name Description
    IBoundable<Envelope, Geometry> item1

    An item which is a geometry.

    IBoundable<Envelope, Geometry> item2

    An item which is a geometry.

    Returns
    Type Description
    double

    The distance between the two items.

    Exceptions
    Type Condition
    InvalidCastException

    if either item is not a Geometry

    Implements

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