毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 计算机安全 >> 正文

台风路径的绘制以及会商PPT的智能制作 第14页

更新时间:2014-6-29:  来源:毕业论文

台风路径的绘制以及会商PPT的智能制作 第14页

            xAxes -= 9;//多加了一次所以减9

   if (points.Count > 0)
   {
    GraphicsPath path = new GraphicsPath();
    path.AddCurve(points.ToArray());
    PointF[] pointfs = path.PathPoints;

    points.Clear();

    for (int i = 0; i <= xAxes; ++i)
    {
     bool found = false;
     int x = i;
     int j = 0;
     int y = int.MinValue;

     while (j < pointfs.Length)
     {
      float xValue = pointfs[j].X;
      float iValue = Convert.ToSingle(i);

      if (xValue.Equals(iValue))
      {
       y = (int)Math.Round(pointfs[j].Y, MidpointRounding.AwayFromZero);
       found = true;

       break;
      }
      else if (xValue > iValue)
       break;

      ++j;
     }

     if (!found)
     {
      float x1 = pointfs[j - 1].X;
      float y1 = pointfs[j - 1].Y;
      float x2 = pointfs[j].X;
      float y2 = pointfs[j].Y;
      float result = (y1 * (x2 - x) + y2 * (x - x1)) / (x2 - x1);
      y = (int)Math.Round(result, MidpointRounding.AwayFromZero);
     System.Drawing.Point pt = new Point();
     pt.X = x;
     pt.Y = y;
     points.Add(pt);
            DataTable dt = table.Clone();
            DateTime mdate = beginTime;

            for (int i = 0; i < points.Count; ++i)
            {
                DataRow row = dt.NewRow();
                row["MDate"] = mdate;
                row["TideHeight"] = points[i].Y / 100.0f;
                row["StationCode"] = stationNO;
                dt.Rows.Add(row);

                mdate = mdate.AddSeconds(UINTTIME);
            return dt;
        }
 }
5、查询有实测数据的潮位站点数据
        public DataTable GetHaveDataTideData_v2(DateTime tfNewDate)
        {
            IDatabaseExec dbexec = DBManager.GetDBExec(Setting.Sql_Station);
   StringBuilder sb = new StringBuilder();

   sb.Append("       SELECT DISTINCT    B_Station_HLValue.StationName AS 站点名 ,                                                                                                                                      ");
   sb.Append("       B_Station_HLValue.StationNO AS 站点编号 ,  B_Station_HLValue.Longitude AS 经度 ,B_Station_HLValue.Latitude AS 纬度 ,floor(B_Station_HLValue.HL_WarningLine) AS [警戒水位(黄零)] ,                                                       ");
   sb.Append("       floor((B_ActualSeaTideData_min.TideHeight - B_Station_HLValue.HL_value*0.01)*100) AS 实测潮位,                                                                        ");
   sb.Append("       floor(B_SeatideData.TideHeight * 100) AS 预报潮位,                                                                                                           ");
   sb.Append("       floor((B_ActualSeaTideData_min.TideHeight - B_Station_HLValue.HL_value*0.01 - B_SeatideData.TideHeight)*100)                                                                 ");
   sb.Append("        AS 增水, B_Station_HLValue.Type as 潮位站类型                                                                                                                              ");
   sb.Append("       FROM (                                                                                                                                      ");
   sb.Append("       select B_Station_HLValue.StationName,B_Station_HLValue.StationNO,B_Station_HLValue.HL_value,B_Station_HLValue.Longitude,B_Station_HLValue.Latitude,B_Station_HLValue.HL_WarningLine, B_Station_HLValue.Type                     ");
   sb.Append("        from ( select Code as StationNO, Name as StationName, ShiftValue as HL_value, lon as Longitude, lat as Latitude , HL_WarningLevel as HL_WarningLine, Type as Type ");
   sb.Append("       from Strongsoft_OrganizationStuff.dbo.B_TideStation ) B_Station_HLValue");
   sb.Append("        ) B_Station_HLValue LEFT OUTER JOIN                                                                  ");
   sb.Append("       B_ActualSeaTideData_min ON                                                                                                                  ");
   sb.Append("       B_Station_HLValue.StationNO = B_ActualSeaTideData_min.StationNO AND                                                                            ");
   sb.Append("       B_ActualSeaTideData_min.MDate = CAST('" + tfNewDate + "'  AS datetime)                                                                  ");
   sb.Append("       LEFT OUTER JOIN                                                                                                                             ");
   sb.Append("       B_SeatideData ON B_SeatideData.StationCode = B_Station_HLValue.StationNO AND                                                                     ");
   sb.Append("       B_SeatideData.MDate = CAST('" + tfNewDate + "' AS datetime)       

 << 上一页  [11] [12] [13] [14] [15] 下一页

台风路径的绘制以及会商PPT的智能制作 第14页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。