Example #1
0
 public void GetMappedPolygon(out Polygon polygon, out CoordinateMap coordinateMap)
 {
     polygon       = new Polygon();
     coordinateMap = new CoordinateMap(Points[0] as GeoPoint, 0, 100);
     foreach (GeoPoint point in Points)
     {
         polygon.AddVertice(coordinateMap.GetPixelPoint(point));
         //polygon.Points.Add(coordinateMap.GetPixelPoint(point));
     }
 }
Example #2
0
        public virtual bool Contains(GeoPoint point)
        {
            //1. Convert points to flat geometry in the cartesian plane.
            CoordinateMap map     = GetCoordinateMap(1);
            PointD        checkPt = map.GetPixelPoint(point);

            //2. Check points against formula for points within the ellipse
            Double res = (Math.Pow(checkPt.X, 2) / Math.Pow(SemiMajorAxisLength, 2)) + (Math.Pow(checkPt.Y, 2) / Math.Pow(SemiMinorAxisLength, 2));

            return(res <= 1);
        }