diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 600acb3..db545dd 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 600acb3..db545dd 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 7c98a13..7e81528 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -132,12 +132,12 @@ conn.Open(); OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); - + string condition = ""; while (dr.Read()) { listID li = new listID(); li.MarkId = Convert.ToString(dr["MARK_ID"]); - + condition += "'"+li.MarkId+"',"; if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { //Datatime @@ -152,7 +152,7 @@ conn.Close(); conn = OledbHelper.sqlConnection(); conn.Open(); - cmd = new OracleCommand("select * from 标识器", conn); + cmd = new OracleCommand("select * from 标识器 where 编号 in("+condition.Substring(0,condition.Length-1)+")", conn); dr = cmd.ExecuteReader(); int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +ellps=krass +units=m +no_defs"); @@ -160,11 +160,11 @@ double x = 558443.622; double y = 3451941.845; - GSOGeoModel model = new GSOGeoModel(); + GSOGeoModel model = null;// new GSOGeoModel(); string filepath; - GSOPoint3d p = new GSOPoint3d(); + //GSOPoint3d p = new GSOPoint3d(); GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -174,17 +174,21 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { + if (id == Convert.ToString(listIDs[i].MarkId)) { - x = Convert.ToDouble(dr["X坐标"]); - y = Convert.ToDouble(dr["Y坐标"]); - GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(y, x); - GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID); - p.X = result.X; - p.Y = result.Y; - p.X += 0.000019; - p.Y += 0.000539; - p.Z = 1.5; + GSOFeature flagFeature = globeControl1.Globe.Layers.GetLayerByCaption("标识器").GetFeatureByID(int.Parse(Convert.ToString(dr["LSSYS_ID"]))); + model = flagFeature.Geometry as GSOGeoModel; + + //x = Convert.ToDouble(dr["X坐标"]); + //y = Convert.ToDouble(dr["Y坐标"]); + //GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(y, x); + //GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID); + //p.X = result.X; + //p.Y = result.Y; + //p.X += 0.000019; + //p.Y += 0.000539; + //p.Z = 1.5; if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; @@ -197,9 +201,9 @@ model.FilePath = filepath; } - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; f.Name = "标识器:" + id; GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); @@ -221,8 +225,10 @@ label.Style.MaxVisibleDistance = -1; newFeature.Label = label; - listIDs[i].x = p.X; - listIDs[i].y = p.Y; + //listIDs[i].x = p.X; + //listIDs[i].y = p.Y; + listIDs[i].x = x; + listIDs[i].y = y; if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } @@ -291,6 +297,8 @@ if (listIDs[m].check == 1) { + GSOPoint3d p = new GSOPoint3d(); + p.X = listIDs[m].x; p.Y = listIDs[m].y; p.Z = 2.5; diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 600acb3..db545dd 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 7c98a13..7e81528 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -132,12 +132,12 @@ conn.Open(); OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); - + string condition = ""; while (dr.Read()) { listID li = new listID(); li.MarkId = Convert.ToString(dr["MARK_ID"]); - + condition += "'"+li.MarkId+"',"; if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { //Datatime @@ -152,7 +152,7 @@ conn.Close(); conn = OledbHelper.sqlConnection(); conn.Open(); - cmd = new OracleCommand("select * from 标识器", conn); + cmd = new OracleCommand("select * from 标识器 where 编号 in("+condition.Substring(0,condition.Length-1)+")", conn); dr = cmd.ExecuteReader(); int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +ellps=krass +units=m +no_defs"); @@ -160,11 +160,11 @@ double x = 558443.622; double y = 3451941.845; - GSOGeoModel model = new GSOGeoModel(); + GSOGeoModel model = null;// new GSOGeoModel(); string filepath; - GSOPoint3d p = new GSOPoint3d(); + //GSOPoint3d p = new GSOPoint3d(); GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -174,17 +174,21 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { + if (id == Convert.ToString(listIDs[i].MarkId)) { - x = Convert.ToDouble(dr["X坐标"]); - y = Convert.ToDouble(dr["Y坐标"]); - GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(y, x); - GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID); - p.X = result.X; - p.Y = result.Y; - p.X += 0.000019; - p.Y += 0.000539; - p.Z = 1.5; + GSOFeature flagFeature = globeControl1.Globe.Layers.GetLayerByCaption("标识器").GetFeatureByID(int.Parse(Convert.ToString(dr["LSSYS_ID"]))); + model = flagFeature.Geometry as GSOGeoModel; + + //x = Convert.ToDouble(dr["X坐标"]); + //y = Convert.ToDouble(dr["Y坐标"]); + //GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(y, x); + //GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID); + //p.X = result.X; + //p.Y = result.Y; + //p.X += 0.000019; + //p.Y += 0.000539; + //p.Z = 1.5; if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; @@ -197,9 +201,9 @@ model.FilePath = filepath; } - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; f.Name = "标识器:" + id; GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); @@ -221,8 +225,10 @@ label.Style.MaxVisibleDistance = -1; newFeature.Label = label; - listIDs[i].x = p.X; - listIDs[i].y = p.Y; + //listIDs[i].x = p.X; + //listIDs[i].y = p.Y; + listIDs[i].x = x; + listIDs[i].y = y; if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } @@ -291,6 +297,8 @@ if (listIDs[m].check == 1) { + GSOPoint3d p = new GSOPoint3d(); + p.X = listIDs[m].x; p.Y = listIDs[m].y; p.Z = 2.5; diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 4930b29..67c4583 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/Cyberpipe.suo b/Cyberpipe.suo index 600acb3..db545dd 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 7c98a13..7e81528 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -132,12 +132,12 @@ conn.Open(); OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); - + string condition = ""; while (dr.Read()) { listID li = new listID(); li.MarkId = Convert.ToString(dr["MARK_ID"]); - + condition += "'"+li.MarkId+"',"; if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { //Datatime @@ -152,7 +152,7 @@ conn.Close(); conn = OledbHelper.sqlConnection(); conn.Open(); - cmd = new OracleCommand("select * from 标识器", conn); + cmd = new OracleCommand("select * from 标识器 where 编号 in("+condition.Substring(0,condition.Length-1)+")", conn); dr = cmd.ExecuteReader(); int ID = GeoScene.Data.GSOProjectManager.AddProject("+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=499885 +y_0=6 +ellps=krass +units=m +no_defs"); @@ -160,11 +160,11 @@ double x = 558443.622; double y = 3451941.845; - GSOGeoModel model = new GSOGeoModel(); + GSOGeoModel model = null;// new GSOGeoModel(); string filepath; - GSOPoint3d p = new GSOPoint3d(); + //GSOPoint3d p = new GSOPoint3d(); GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -174,17 +174,21 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { + if (id == Convert.ToString(listIDs[i].MarkId)) { - x = Convert.ToDouble(dr["X坐标"]); - y = Convert.ToDouble(dr["Y坐标"]); - GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(y, x); - GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID); - p.X = result.X; - p.Y = result.Y; - p.X += 0.000019; - p.Y += 0.000539; - p.Z = 1.5; + GSOFeature flagFeature = globeControl1.Globe.Layers.GetLayerByCaption("标识器").GetFeatureByID(int.Parse(Convert.ToString(dr["LSSYS_ID"]))); + model = flagFeature.Geometry as GSOGeoModel; + + //x = Convert.ToDouble(dr["X坐标"]); + //y = Convert.ToDouble(dr["Y坐标"]); + //GeoScene.Data.GSOPoint2d pt2d = new GeoScene.Data.GSOPoint2d(y, x); + //GeoScene.Data.GSOPoint2d result = GeoScene.Data.GSOProjectManager.Inverse(pt2d, ID); + //p.X = result.X; + //p.Y = result.Y; + //p.X += 0.000019; + //p.Y += 0.000539; + //p.Z = 1.5; if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; @@ -197,9 +201,9 @@ model.FilePath = filepath; } - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; f.Name = "标识器:" + id; GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); @@ -221,8 +225,10 @@ label.Style.MaxVisibleDistance = -1; newFeature.Label = label; - listIDs[i].x = p.X; - listIDs[i].y = p.Y; + //listIDs[i].x = p.X; + //listIDs[i].y = p.Y; + listIDs[i].x = x; + listIDs[i].y = y; if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } @@ -291,6 +297,8 @@ if (listIDs[m].check == 1) { + GSOPoint3d p = new GSOPoint3d(); + p.X = listIDs[m].x; p.Y = listIDs[m].y; p.Z = 2.5; diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 4930b29..67c4583 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.pdb b/bin/x86/Debug/EMSCyberpipe.pdb index a0e6509..ecda34b 100644 --- a/bin/x86/Debug/EMSCyberpipe.pdb +++ b/bin/x86/Debug/EMSCyberpipe.pdb Binary files differ