コード例 #1
0
        private void InitializeQuadtree()
        {
            var qt     = new ShapefileFeatureSourceQuadtree();
            var sfs    = CreateShapeSource();
            int nIndex = 0;
            int returnedCount;

            do
            {
                Dictionary <int, Shape> shapes = sfs.GetShapes(ref nIndex, 1000, null);
                foreach (KeyValuePair <int, Shape> shape in shapes)
                {
                    qt.Insert(shape.Value.Range.Extent.ToEnvelope(), shape.Key);
                }
                returnedCount = shapes.Count;
            } while (1000 == returnedCount);
            Quadtree = qt;
        }
コード例 #2
0
 private void InitializeQuadtree()
 {
     var qt = new ShapefileFeatureSourceQuadtree();
     var sfs = CreateShapeSource();
     int nIndex = 0;
     int returnedCount;
     do
     {
         Dictionary<int, Shape> shapes = sfs.GetShapes(ref nIndex, 1000, null);
         foreach (KeyValuePair<int, Shape> shape in shapes)
         {
             qt.Insert(shape.Value.Range.Extent.ToEnvelope(), shape.Key);
         }
         returnedCount = shapes.Count;
     } while (1000 == returnedCount);
     Quadtree = qt;
 }