Esempio n. 1
0
 /// <summary>
 /// Get the approximated distance
 /// </summary>
 /// <param name="p1"></param>
 /// <param name="p2"></param>
 /// <returns></returns>
 public static double GetDistance(GeoPoint p1, GeoPoint p2)
 {
     return(Math.Sqrt(GetDistance2(p1, p2)));
 }
Esempio n. 2
0
 /// <summary>
 /// Get the edge with a distance roughly lower than radius from point p
 /// </summary>
 /// <param name="p"></param>
 /// <param name="radius"></param>
 /// <returns></returns>
 public HashSet <Edge> RangeQuery(GeoPoint p, double radius)
 {
     return(this.EdgeIndex.RangeQuery(p, radius));
 }
Esempio n. 3
0
 public Vertex(long id, double lat, double lng)
 {
     this.id    = id;
     this.point = new GeoPoint(lat, lng);
 }
Esempio n. 4
0
        public HashSet <Edge> GetCandiateEdges(Vertex src, GeoPoint destPoint, double maxCost, double maxDist)
        {
            AStar astar = new AStar(this);

            return(astar.GetCandiateEdges(src, destPoint, maxCost, maxDist));
        }