diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index e12d8e1..0ad435e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index e12d8e1..0ad435e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/MainFrm.cs b/MainFrm.cs
index 5cd5a2e..364f21b 100644
--- a/MainFrm.cs
+++ b/MainFrm.cs
@@ -3367,149 +3367,6 @@
return dismarker.Position;
}
- ///
- /// 计算指定feature对象与除了该feature所在图层之外的 所有管线图层中的所有feature对象 的垂直距离 并在表格中记录符合要求的管线
- ///
- ///
- ///
- ///
- ///
- private void VerticalDistanceAnalysis(string type, GSOFeature selectedFeature, List _pipelineLayerNames, double verticalDistance, double horizontalDistance)
- {
- if (selectedFeature == null)
- {
- selectState = 0;
- MessageBox.Show("请选择一条管线!");
- return;
- }
- GSOGeoPolyline3D line1 = selectedFeature.Geometry as GSOGeoPolyline3D;
- if (line1 == null)
- {
- selectState = 0;
- MessageBox.Show("请选择一条管线!");
- return;
- }
- GSOGeoPolygon3D polygon = line1.CreateBuffer(0.1, true, 5, true, false);
-
- string caption = selectedFeature.Dataset.Caption;
-
- GSOPoint3d pntIntersect1 = new GSOPoint3d();
- GSOPoint3d pntIntersect2 = new GSOPoint3d();
- GSOPoint3d pntProIntersect1 = new GSOPoint3d();
- GSOPoint3d pntProIntersect2 = new GSOPoint3d();
- for (int i = 0; i < _pipelineLayerNames.Count; i++)
- {
- if (caption == _pipelineLayerNames[i]) continue;
- GSOLayer layer2 = globeControl1.Globe.Layers.GetLayerByCaption(_pipelineLayerNames[i]);
- if (layer2 == null) continue;
- GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(_pipelineLayerNames[i]);
- GSOFeatures feats2 = FeatureStatisticsService.GetLayerFeatures(polygon,layer);
- if (feats2 == null) continue;
- for (int j = 0; j < feats2.Length; j++)
- {
- GSOFeature feat2 = feats2[j];
- GSOGeoPolyline3D line2 = feats2[j].Geometry as GSOGeoPolyline3D;
- if (line2 == null) continue;
- GSOPipeLineStyle3D pipeStyle1 = line1.Style as GSOPipeLineStyle3D;
- GSOPipeLineStyle3D pipeStyle2 = line2.Style as GSOPipeLineStyle3D;
- if (pipeStyle1 == null || pipeStyle2 == null) continue;
-
- double dDist = -1;
- dDist = globeControl1.Globe.Analysis3D.ComputeHorizonDistance(line1, line2, out pntIntersect1, out pntIntersect2, out pntProIntersect1, out pntProIntersect2, false);
-
- if (dDist > -1)
- {
- dDist = Math.Abs(pntIntersect1.Z - pntIntersect2.Z) - pipeStyle1.Radius - pipeStyle2.Radius;//获得净距值
-
- if (dDist < verticalDistance)
- {
- int idx = -1;
- GSOPoint3d markerPosition = new GSOPoint3d();
- if (type == "垂直净距分析")
- {
- feat2.HighLight = true;
- markerPosition = LabelVerticalDistance(layerTemp, pntIntersect1, pntIntersect2, dDist, true);
-
- idx = dataGridViewX3.Rows.Add();
- dataGridViewX3.Rows[idx].Cells[0].Value = caption;
- dataGridViewX3.Rows[idx].Cells[1].Value = selectedFeature.Name;
- dataGridViewX3.Rows[idx].Cells[2].Value = layer2.Caption;// feat2.Dataset.Caption;一致
- dataGridViewX3.Rows[idx].Cells[3].Value = feat2.Name;
- dataGridViewX3.Rows[idx].Cells[4].Value = dDist.ToString("0.00");
- }
- else if (type == "碰撞分析")
- {
- feat2.HighLight = true;
- markerPosition = LabelVerticalDistance(layerTemp, pntIntersect1, pntIntersect2, dDist, false);
-
- selectedFeature.HighLight = true;
- idx = dataGridViewX5.Rows.Add();
- dataGridViewX5.Rows[idx].Cells[0].Value = dataGridViewX4.Rows[0].Cells[0].Value.ToString();
- dataGridViewX5.Rows[idx].Cells[1].Value = selectedFeature.Name;
- dataGridViewX5.Rows[idx].Cells[2].Value = layer2.Caption;
- dataGridViewX5.Rows[idx].Cells[3].Value = feat2.Name;
- }
- else if (type == "间距分析")
- {
- GSOGeoPolygon3D polygonSpacing = line2.CreateBuffer(horizontalDistance, true, 5, false, false);
- if (polygonSpacing != null)
- {
- GSOFeatures horizontalFeatures = layer2.FindFeaturesInPolygon(polygonSpacing, false);
- if (horizontalFeatures != null)
- {
- for (int m = 0; m < horizontalFeatures.Length; m++)
- {
- GSOFeature horizontalFeature = horizontalFeatures[m];
- if (horizontalFeature != null && horizontalFeature.ID == feat2.ID)
- {
- feat2.HighLight = true;
- idx = dataGridViewAnalysisResult.Rows.Add();
- dataGridViewAnalysisResult.Rows[idx].Tag = feat2;
- dataGridViewAnalysisResult.Rows[idx].Cells[0].Value = dataGridViewLineList.Rows[0].Cells[0].Value.ToString();
- dataGridViewAnalysisResult.Rows[idx].Cells[1].Value = selectedFeature.Name;
- dataGridViewAnalysisResult.Rows[idx].Cells[2].Value = layer2.Caption;
- dataGridViewAnalysisResult.Rows[idx].Cells[3].Value = feat2.Name;
- dataGridViewAnalysisResult.Rows[idx].Cells[4].Value = dDist.ToString("0.00");
- dataGridViewAnalysisResult.Rows[idx].Cells[5].Value = horizontalDistance.ToString("0.00");
- break;
- }
- }
- }
- }
- }
-
- if (m_FeaturesWithBianhao.ContainsKey(selectedFeature.Name + "-" + feats2[j].Name) == false)
- {
- m_FeaturesWithBianhao.Add(selectedFeature.Name + "-" + feats2[j].Name, markerPosition);//添加飞行位置记录
- }
-
- if (featCount.ContainsKey(layer2.Caption))
- {
- featCount[layer2.Caption] = featCount[layer2.Caption] + 1;
- }
- else
- {
- featCount.Add(layer2.Caption, 1);
- }
- if (featLenth.ContainsKey(layer2.Caption))
- {
- featLenth[layer2.Caption] = featLenth[layer2.Caption] + line2.GetSpaceLength(true, 6378137);
- }
- else
- {
- featLenth.Add(layer2.Caption, line2.GetSpaceLength(true, 6378137));
- }
- }
- }
- line2.ReleaseInnerPointer();
- feat2.ReleaseInnerPointer();
- }
- feats2.ReleaseInnerPointer();
- }
- line1.ReleaseInnerPointer();
- selectedFeature.ReleaseInnerPointer();
- }
-
#region wxl重构未完成
///
/// 碰撞分析
@@ -4609,7 +4466,7 @@
if (selectedFeature != null)
{
selectState = 1;
- VerticalDistanceAnalysis("间距分析", selectedFeature, Utility.m_PipelineLayerNames, dVerticalJingJuBiaoZhun, dHorizontalJingJuBiaoZhun);//分析
+// VerticalDistanceAnalysis("间距分析", selectedFeature, Utility.m_PipelineLayerNames, dVerticalJingJuBiaoZhun, dHorizontalJingJuBiaoZhun);//分析
}
}
}
@@ -4640,7 +4497,7 @@
for (int i = 0; i < feats.Length; i++)
{
selectState = 1;
- VerticalDistanceAnalysis("间距分析", feats[i], Utility.m_PipelineLayerNames, dVerticalJingJuBiaoZhun, dHorizontalJingJuBiaoZhun);//分析
+// VerticalDistanceAnalysis("间距分析", feats[i], Utility.m_PipelineLayerNames, dVerticalJingJuBiaoZhun, dHorizontalJingJuBiaoZhun);//分析
}
}
if (featCount.Count > 0)