コード例 #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));
     }
 }
コード例 #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);
        }
コード例 #3
0
ファイル: GeoEllipse.cs プロジェクト: StevePunak/KanoopCommon
        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);
        }
コード例 #4
0
ファイル: GeoLine.cs プロジェクト: StevePunak/KanoopCommon
 public GeoLine(Line line, CoordinateMap map)
     : this(map.GetGeoPoint(line.P1 as PointD), map.GetGeoPoint(line.P2 as PointD))
 {
 }