예제 #1
0
파일: Repository.cs 프로젝트: akeil/OwnZone
        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));
        }
예제 #2
0
파일: Repository.cs 프로젝트: akeil/OwnZone
        public override double Distance(ILocation location)
        {
            var p = (Point)Feature.Geometry;

            return(Geo.Distance(location, asLocation(p.Coordinates)));
        }