2009年1月19日 星期一

實驗用資料-區域設定座標資料

-------------Console.WriteLine("結束抓資料庫"); ------------

//point in polygon test----仁愛醫院1
/*Point point1 = new Point(25.036922, 121.544865);
Point point2 = new Point(25.036961, 121.544613);
Point point3 = new Point(25.036966, 121.544403);
Point point4 = new Point(25.037306, 121.544452);
Point point5 = new Point(25.037277, 121.544661);*/
//point in polygon test----中原噴水池-活動中心區
/*Point point1 = new Point(24.959268, 121.240246);
Point point2 = new Point(24.959312, 121.241593);
Point point3 = new Point(24.957673, 121.241587);
Point point4 = new Point(24.957216, 121.241646);
Point point5 = new Point(24.956812, 121.241303);
Point point6 = new Point(24.957581, 121.239962);*/

//point in polygon test----仁愛醫院2
/*Point point1 = new Point(25.037647, 121.544462);
Point point2 = new Point(25.037715, 121.545128);
Point point3 = new Point(25.036879, 121.545128);
Point point4 = new Point(25.036888, 121.544398);
Point point5 = new Point(25.037379, 121.544420);*/

//point in polygon test----中原門口騎機車模式
/*Point point1 = new Point(24.957449, 121.240037);
Point point2 = new Point(24.957522, 121.240509);
Point point3 = new Point(24.956997, 121.240810);
Point point4 = new Point(24.956803, 121.240525);
Point point5 = new Point(24.956880, 121.240193);
Point point6 = new Point(24.957245, 121.239983);*/


//point in polygon test----測試範圍為整個板橋市
/*Point point1 = new Point(25.086843, 121.309662);
Point point2 = new Point(25.093061, 121.522522);
Point point3 = new Point(25.027128, 121.559601);
Point point4 = new Point(24.928785, 121.592560);
Point point5 = new Point(24.913840, 121.404419);
Point point6 = new Point(25.003484, 121.280823);*/


//point in polygon test----公車模式區域1-板橋新公車站
/*Point point1 = new Point(25.014538, 121.463020);
Point point2 = new Point(25.015423, 121.461582);
Point point3 = new Point(25.016823, 121.461647);
Point point4 = new Point(25.017348, 121.462955);
Point point5 = new Point(25.016425, 121.464361);
Point point6 = new Point(25.015200, 121.464318);

//point in polygon test----公車模式區域2-大漢橋
Point point7 = new Point(25.039649, 121.457119);
Point point8 = new Point(25.040777, 121.462784);
Point point9 = new Point(25.037705, 121.465230);
Point point10 = new Point(25.033311, 121.466818);
Point point11 = new Point(25.031639, 121.460509);
Point point12 = new Point(25.035955, 121.456518);

//point in polygon test----公車模式區域3-五權路口
Point point13 = new Point(25.069827, 121.449620);
Point point14 = new Point(25.069944, 121.451572);
Point point15 = new Point(25.068584, 121.452549);
Point point16 = new Point(25.068020, 121.453149);
Point point17 = new Point(25.067437, 121.451776);
Point point18 = new Point(25.068826, 121.449512);*/
//-------------------------------------------------
//我的中原
string getgps0 = querycontent.Split(';')[0];
string getgps1 = querycontent.Split(';')[1];
string getgps2 = querycontent.Split(';')[2];
string getgps3 = querycontent.Split(';')[3];
string getgps4 = querycontent.Split(';')[4];
string getgps5 = querycontent.Split(';')[5];
Point point1 = new Point(double.Parse(getgps0.Split(',')[0]), double.Parse(getgps0.Split(',')[1]));
Point point2 = new Point(double.Parse(getgps1.Split(',')[0]), double.Parse(getgps1.Split(',')[1]));
Point point3 = new Point(double.Parse(getgps2.Split(',')[0]), double.Parse(getgps2.Split(',')[1]));
Point point4 = new Point(double.Parse(getgps3.Split(',')[0]), double.Parse(getgps3.Split(',')[1]));
Point point5 = new Point(double.Parse(getgps4.Split(',')[0]), double.Parse(getgps4.Split(',')[1]));
Point point6 = new Point(double.Parse(getgps5.Split(',')[0]), double.Parse(getgps5.Split(',')[1]));

/*
Point point1 = new Point(double.Parse(querycontent.Split(';')[0].Split(',')[0]),double.Parse( querycontent.Split(';')[0].Split(',')[1]));
Point point2 = new Point(double.Parse(querycontent.Split(';')[1].Split(',')[0]), double.Parse(querycontent.Split(';')[1].Split(',')[1]));
Point point3 = new Point(double.Parse(querycontent.Split(';')[2].Split(',')[0]), double.Parse(querycontent.Split(';')[2].Split(',')[1]));
Point point4 = new Point(double.Parse(querycontent.Split(';')[3].Split(',')[0]), double.Parse(querycontent.Split(';')[3].Split(',')[1]));
Point point5 = new Point(double.Parse(querycontent.Split(';')[4].Split(',')[0]), double.Parse(querycontent.Split(';')[4].Split(',')[1]));
Point point6 = new Point(double.Parse(querycontent.Split(';')[5].Split(',')[0]), double.Parse(querycontent.Split(';')[5].Split(',')[1]));
*/


// double x1 = double.Parse(querycontent.Split(';')[0].Split(',')[0]);//test用
// double y1 =double.Parse( querycontent.Split(';')[0].Split(',')[1]);//test用

// Console.WriteLine(x1) ;//test 用




/*
//point in polygon test----火車模式區域1-板橋新火車站
Point point1 = new Point(25.015452, 121.462923);
Point point2 = new Point(25.015180, 121.464103);
Point point3 = new Point(25.014257, 121.464640);
Point point4 = new Point(25.013430, 121.463642);
Point point5 = new Point(25.013848, 121.462344);
Point point6 = new Point(25.014888, 121.461926);
*/
//point in polygon test----火車模式區域2-桃園火車站
Point point7 = new Point(24.989919, 121.312044);
Point point8 = new Point(24.990201, 121.314297);
Point point9 = new Point(24.988820, 121.315563);
Point point10 = new Point(24.987925, 121.314726);
Point point11 = new Point(24.988022, 121.313224);
Point point12 = new Point(24.988985, 121.311765);

//point in polygon test----火車模式區域3-中壢火車站
Point point13 = new Point(24.955227, 121.225784);
Point point14 = new Point(24.954507, 121.227951);
Point point15 = new Point(24.953009, 121.228530);
Point point16 = new Point(24.951842, 121.225805);
Point point17 = new Point(24.952737, 121.223853);
Point point18 = new Point(24.955032, 121.224003);

//-------------------------------------------
//區域1
Point[] endPoints = new Point[7];
endPoints[0] = point1;
endPoints[1] = point2;
endPoints[2] = point3;
endPoints[3] = point4;
endPoints[4] = point5;
endPoints[5] = point6;
endPoints[6] = point1;
Polygon myPloygon = new Polygon(endPoints);

//區域2
Point[] endPoints1 = new Point[7];
endPoints1[0] = point7;
endPoints1[1] = point8;
endPoints1[2] = point9;
endPoints1[3] = point10;
endPoints1[4] = point11;
endPoints1[5] = point12;
endPoints1[6] = point7;
Polygon myPloygon1 = new Polygon(endPoints1);

//區域3
Point[] endPoints2 = new Point[7];
endPoints2[0] = point13;
endPoints2[1] = point14;
endPoints2[2] = point15;
endPoints2[3] = point16;
endPoints2[4] = point17;
endPoints2[5] = point18;
endPoints2[6] = point13;
Polygon myPloygon2 = new Polygon(endPoints2);

沒有留言:

張貼留言

try comments