C# 中 R*-tree 的 SQLite 函数

SQLite function for R*-tree in C#

我需要编写 SQLite 函数 circle。像下面这样的查询将用于查找与以 45.3,22.9 为中心且半径为 5.0 的圆重叠的所有 R*Tree 条目:

SELECT id FROM demo_index WHERE id MATCH circle(45.3, 22.9, 5.0)

我是从这个开始的:

[SQLiteFunction(Arguments = 3, FuncType = FunctionType.Scalar, Name = "circle")]
    public class GetPointsInCircle : SQLiteFunction
    {
        public override object Invoke(object[] args)
        {
           double centerX = Convert.ToDouble(args[0]);
           double centerY = Convert.ToDouble(args[1]);
           double radius = Convert.ToDouble(args[2]);
        }
    }

当我搜索 Invoke 方法时,它处理了在方法调用期间传递的 args。但是我应该如何获得当前 r*-tree 的访问权限以检索必要的条目?

SQLiteFunction 注册一个普通的 SQL 函数。

注册 R 树几何回调是不同的,并且不受 .net SQLite 驱动程序支持。