public override double Distance(ILocation location) { var l = (LineString)Feature.Geometry; var path = new List <ILocation>(); foreach (var coordinate in l.Coordinates) { path.Add(asLocation(coordinate)); } return(Geo.DistanceToPath(location, path)); }
public override double Distance(ILocation location) { var p = (Point)Feature.Geometry; return(Geo.Distance(location, asLocation(p.Coordinates))); }