//TODO процедура отрисовки точек полигона void ShowPolygonPoints(List <PointLatLng> poly) { RemoveGroupDot(enumGeoPointType.geoptPolyDot); for (int i = 0; i < poly.Count; i++) { polyOverlay.Markers.Add(CMGeoPoint.GetGMarkerGoogle(i.ToString(), poly[i], enumGeoPointType.geoptPolyDot, GMap.NET.WindowsForms.Markers.GMarkerGoogleType.yellow_small)); //GetGMarkerGoogle ///TextResult.Text += string.Format("{0} {1}", poly[i].Lat, poly[i].Lng) + " \r\n"; ; } }
PointLatLng OffsetRunwayBegin(CMGeoPoint point) { PointLatLng v1 = CMGeoBase.Mercator(point.Coordinates); PointLatLng v2 = CMGeoBase.Mercator(RunwayBegin); double AzimutP1 = CMGeoBase.GetAsimut(APInf.CRW.RunwayBegin, point); double AzimutP2 = CMGeoBase.GetAsimut(APInf.CRW.RunwayEnd, APInf.CRW.RunwayBegin); double Angle = Math.Abs(AzimutP1 - APInf.CRW.RunwayBegin.BackTrueCourse); double K = 1; if (AzimutP2 >= 0 && AzimutP2 <= 180) { if (AzimutP1 >= AzimutP2 && AzimutP1 <= (AzimutP2 + 180)) { K = -1; } else { K = 1; } } else { if (AzimutP1 <= AzimutP2 && AzimutP1 >= (AzimutP2 - 180)) { K = 1; } else { K = -1; } } double Latitude = 0; //(v1.Lat - v2.Lat) * Math.Cos(Angle * DegToRad); double Longtitude = 0; //(v1.Lng - v2.Lng) * Math.Cos(Angle * DegToRad); double distance = CMGeoBase.GetDistance(APInf.CRW.RunwayBegin, point); double x = distance * Math.Cos(Angle * CMGeoBase.DegToRad); double y = Math.Abs((distance * Math.Sin(Angle * CMGeoBase.DegToRad))) * K; Latitude = Math.Round(y, 2); Longtitude = Math.Round(x, 2); PointLatLng v3 = new PointLatLng(Longtitude, Latitude); return(v3); }
public CMAirPortInfo() { KTA = new CMGeoPoint(); Runways = new CMAPRunways(); }