Esempio n. 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));
     }
 }
Esempio n. 2
0
        public CoordinateMap Clone()
        {
            CoordinateMap ret = new CoordinateMap();

            ret.m_BearingDelta       = m_BearingDelta;
            ret._pixelsPerMeter      = _pixelsPerMeter;
            ret._pixelReferencePoint = _pixelReferencePoint.Clone() as PointD;
            ret._geoReferencePoint   = _geoReferencePoint.Clone() as GeoPoint;
            return(ret);
        }
Esempio n. 3
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);
        }
Esempio n. 4
0
 public GeoLine(Line line, CoordinateMap map)
     : this(map.GetGeoPoint(line.P1 as PointD), map.GetGeoPoint(line.P2 as PointD))
 {
 }