Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 51 lines (42 sloc) 1.904 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using sones.Plugins.Index.Helper;

namespace sones.Plugins.Index.Spatial
{
    /// <summary>
    /// Interface defines a 2-dimensional Spatial Index
    /// used by the sones GraphDB.
    ///
    /// Supports
    /// - Exact-(Point)-Match
    /// - Range-(Within)-Match
    /// - Near-(Neighborhood)-Match
    /// </summary>
    public interface ISonesSpatialIndex : ISonesIndex
    {
        #region Retrieval

        #region Exact and Region match (Returns all values at a given point or in a given space.)

        /// <summary>
        /// Returns all vertexIDs associated to the given geometry.
        /// </summary>
        /// <param name="myGeometry">Search space</param>
        /// <param name="myVertexIDs">Stores found vertexIDs</param>
        /// <returns>True, if at least one object has been found at the given point or in the space.</returns>
        bool TryGetValues(IGeometry myGeometry, out ICloseableEnumerable<Int64> myVertexIDs);

        #endregion

        #region Neighborhood match (Returns k-nearest neighbours with optional maximum distance.)

        /// <summary>
        /// Returns k nearest neighbours of the given point.
        /// </summary>
        /// <param name="myCentralPoint">GeoHash of central point</param>
        /// <param name="myK">Maximum number of neighbours to find</param>
        /// <param name="myVertexIDs">Stores found vertexIDs</param>
        /// <param name="myMaximumDistance">Defines an optional search boundary</param>
        /// <returns>True, if at least one neighbour has been found.</returns>
        bool TryGetValuesNear(IPoint myCentralPoint, Int32 myK, out ICloseableEnumerable<Int64> myVertexIDs, double? myMaximumDistance);

        #endregion

        #endregion
    }
}
Something went wrong with that request. Please try again.