Ejemplo n.º 1
0
        private void DoTheJob(Canvas canvas, IRI.Ket.Spatial.DataStructures.SFCRTree tree, Label label, string labelString)
        {
            canvas.Children.Clear();

            int height = 0;

            DrawNode(tree.Root, 0, canvas, ref height);

            label.Content = string.Format("R-Tree ({0}); Height={1}", labelString, height);
        }
Ejemplo n.º 2
0
        private void Referesh()
        {
            IRI.Ket.Spatial.DataStructures.RTree tree01 = new IRI.Ket.Spatial.DataStructures.RTree(this.rectangles.ToArray(), 3);

            int height = 0;

            DrawNode(tree01.Root, 0, canvas1, ref height);
            title1.Content = string.Format("R-Tree (Simple Tree); Height={0}", height.ToString());


            //************************************ 02
            IRI.Ket.Spatial.DataStructures.SFCRTree tree02 = new IRI.Ket.Spatial.DataStructures.SFCRTree(
                this.rectangles.ToArray(),
                IRI.Ket.Spatial.DataStructures.SFCRTree.GrayComparer,
                3);
            DoTheJob(this.canvas2, tree02, this.title2, "Gray");

            //************************************ 03
            IRI.Ket.Spatial.DataStructures.SFCRTree tree03 = new IRI.Ket.Spatial.DataStructures.SFCRTree(
                this.rectangles.ToArray(),
                IRI.Ket.Spatial.DataStructures.SFCRTree.NOrderingComparer,
                3);
            DoTheJob(this.canvas3, tree03, this.title3, "NOrdering");

            //************************************ 04
            IRI.Ket.Spatial.DataStructures.SFCRTree tree04 = new IRI.Ket.Spatial.DataStructures.SFCRTree(
                this.rectangles.ToArray(),
                IRI.Ket.Spatial.DataStructures.SFCRTree.ZOrderingComparer,
                3);
            DoTheJob(this.canvas4, tree04, this.title4, "ZOrdering");

            //************************************ 05
            IRI.Ket.Spatial.DataStructures.SFCRTree tree05 = new IRI.Ket.Spatial.DataStructures.SFCRTree(
                this.rectangles.ToArray(),
                IRI.Ket.Spatial.DataStructures.SFCRTree.HilbertComparer,
                3);
            DoTheJob(this.canvas5, tree05, this.title5, "Hilbert");

            //************************************ 06
            IRI.Ket.Spatial.DataStructures.SFCRTree tree06 = new IRI.Ket.Spatial.DataStructures.SFCRTree(
                this.rectangles.ToArray(),
                IRI.Ket.Spatial.DataStructures.SFCRTree.DiagonalLebesgueComparer,
                3);
            DoTheJob(this.canvas6, tree06, this.title6, "DiagonalLebesgue");

            //************************************ 07
            IRI.Ket.Spatial.DataStructures.SFCRTree tree07 = new IRI.Ket.Spatial.DataStructures.SFCRTree(
                this.rectangles.ToArray(),
                IRI.Ket.Spatial.DataStructures.SFCRTree.PeanoComparer,
                3);
            DoTheJob(this.canvas7, tree07, this.title7, "Variant of Peano");

            //************************************ 08
            IRI.Ket.Spatial.DataStructures.SFCRTree tree08 = new IRI.Ket.Spatial.DataStructures.SFCRTree(
                this.rectangles.ToArray(),
                IRI.Ket.Spatial.DataStructures.SFCRTree.Peano02Comparer,
                3);
            DoTheJob(this.canvas8, tree08, this.title8, "Variant of Peano");

            //************************************ 09
            IRI.Ket.Spatial.DataStructures.SFCRTree tree09 = new IRI.Ket.Spatial.DataStructures.SFCRTree(
                this.rectangles.ToArray(),
                IRI.Ket.Spatial.DataStructures.SFCRTree.Peano03Comparer,
                3);
            DoTheJob(this.canvas9, tree09, this.title9, "Variant of Peano");
        }