Пример #1
0
 /// <summary>
 /// 构建道路的R树,需要一段时间,最好用多线程
 /// </summary>
 public void BuildRoadRtree()
 {
     _RoadRtree = new StRtree();
     foreach (var item in _Roads)
     {
         _RoadRtree.Insert(item.Envelope, item);
     }
     _RoadRtree.Build();
 }
Пример #2
0
 /// <summary>
 /// 构建道路段的R树,所需时间更长,最好用多线程
 /// </summary>
 public void BuildRoadSegmentRtree()
 {
     _RoadSegmentRtree = new StRtree();
     foreach (var item in _Roads)
     {
         var segs = item.GetRoadSegments();
         foreach (var seg in segs)
         {
             RoadSegmentRtree.Insert(seg.GetOptimizeEnvelop(), seg);
         }
     }
     _RoadSegmentRtree.Build();
 }
 private void BulidRTree()
 {
     try
     {
         segmentationRTree = new StRtree();
         foreach (var item in trajData)
         {
             for (int i = 0; i < item.GPSCount - 1; i++)
             {
                 GPSSegmentation gg = item.GetSeqmentationAtIndex(i);
                 segmentationRTree.Insert(gg.GetOptimizeEnvelop(), gg);
             }
         }
         segmentationRTree.Build();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="McIndexPointSnapper"/> class.
 /// </summary>
 /// <param name="index"></param>
 public McIndexPointSnapper(ISpatialIndex index)
 {
     _index = (StRtree)index;
 }