/// <summary> /// 构建道路的R树,需要一段时间,最好用多线程 /// </summary> public void BuildRoadRtree() { _RoadRtree = new StRtree(); foreach (var item in _Roads) { _RoadRtree.Insert(item.Envelope, item); } _RoadRtree.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; } }