Beispiel #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));
     }
 }
        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);
        }
Beispiel #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);
        }
Beispiel #4
0
 public GeoLine(Line line, CoordinateMap map)
     : this(map.GetGeoPoint(line.P1 as PointD), map.GetGeoPoint(line.P2 as PointD))
 {
 }