예제 #1
0
 private List <DirectedRoad> GetNearbyRoads(Coord query, double radiusInMeters)
 {
     if (SearchGrid != null)
     {
         return(SearchGrid.GetNearbyValues(query, radiusInMeters));
     }
     else
     {
         int i;
         return(Graph.Roads.Where(x => query.SnapToPolyline(x.Geometry, out i).HaversineDistance(query).DistanceInMeters < radiusInMeters).ToList());
     }
 }