diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index d71adec..717170e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index d71adec..717170e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/FeatureStatisticsService.cs b/FeatureStatisticsService.cs
index c147e55..cfdaf5c 100644
--- a/FeatureStatisticsService.cs
+++ b/FeatureStatisticsService.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Globalization;
using GeoScene.Data;
using GeoScene.Globe;
@@ -17,9 +18,9 @@
public static GSOFeatures Intersect_PointLayerByType(GSOGeoPolygon3D polygon, GSOLayer layer, string type)
{
- if (layer == null) return null;
-
GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
+
if (polygon == null)
{
@@ -100,9 +101,10 @@
///
public GSOFeatures GetPipesByValueSection(GSOGeoPolygon3D polygon, GSOLayer layer, double? min, double? max, string fieldName)
{
- if (layer == null) return null;
- GSOFeatures result = new GSOFeatures();
+
GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
+ GSOFeatures result = new GSOFeatures();
//TODOLIST:优化为只获取管线,目前不清楚调用方式
GSOFeatures feats = (polygon == null) ? flayer.GetAllFeatures() : flayer.FindFeaturesInPolygon(polygon, false);
@@ -129,10 +131,10 @@
public List GroupPipeByDiameter(GSOGeoPolygon3D polygon, GSOLayer layer)
{
- if (layer == null) return null;
- List result = new List();
-
+
GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
+ List result = new List();
//TODOLIST:优化为只获取管线,目前不清楚调用方式
GSOFeatures feats = (polygon == null) ? flayer.GetAllFeatures() : flayer.FindFeaturesInPolygon(polygon, false);
@@ -164,7 +166,7 @@
}
FeaturesClassfyResult featuresClass = new FeaturesClassfyResult();
featuresClass.layerName = layer.Caption;
- featuresClass.groupFieldValue = diameter.ToString();
+ featuresClass.groupFieldValue = diameter.ToString(CultureInfo.InvariantCulture);
featuresClass.ncount = ncount;
featuresClass.sum = Math.Round(totalLength, 2);
@@ -183,10 +185,9 @@
///
public List GroupAccessories(GSOGeoPolygon3D polygon, GSOLayer layer)
{
- if (layer == null) return null;
- List result = new List();
-
GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
+ List result = new List();
//layer.Name是表名
string[] accessStrs = Utility.getAccStrsByLayer(layer.Name);
@@ -232,12 +233,12 @@
///
public FeaturesClassfyResult GroupPipeByMaterial(GSOGeoPolygon3D polygon, GSOLayer layer, string material)
{
- if (layer == null) return null;
+
+ GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
FeaturesClassfyResult result = new FeaturesClassfyResult();
- GSOFeatureLayer flayer = layer as GSOFeatureLayer;
-
- //TODOLIST:优化为只获取管线,目前不清楚调用方式
+
GSOFeatures feats = (polygon == null) ? flayer.GetAllFeatures() : flayer.FindFeaturesInPolygon(polygon, false);
string fixedMaterial = material == "无" ? "" : material;
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index d71adec..717170e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/FeatureStatisticsService.cs b/FeatureStatisticsService.cs
index c147e55..cfdaf5c 100644
--- a/FeatureStatisticsService.cs
+++ b/FeatureStatisticsService.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Globalization;
using GeoScene.Data;
using GeoScene.Globe;
@@ -17,9 +18,9 @@
public static GSOFeatures Intersect_PointLayerByType(GSOGeoPolygon3D polygon, GSOLayer layer, string type)
{
- if (layer == null) return null;
-
GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
+
if (polygon == null)
{
@@ -100,9 +101,10 @@
///
public GSOFeatures GetPipesByValueSection(GSOGeoPolygon3D polygon, GSOLayer layer, double? min, double? max, string fieldName)
{
- if (layer == null) return null;
- GSOFeatures result = new GSOFeatures();
+
GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
+ GSOFeatures result = new GSOFeatures();
//TODOLIST:优化为只获取管线,目前不清楚调用方式
GSOFeatures feats = (polygon == null) ? flayer.GetAllFeatures() : flayer.FindFeaturesInPolygon(polygon, false);
@@ -129,10 +131,10 @@
public List GroupPipeByDiameter(GSOGeoPolygon3D polygon, GSOLayer layer)
{
- if (layer == null) return null;
- List result = new List();
-
+
GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
+ List result = new List();
//TODOLIST:优化为只获取管线,目前不清楚调用方式
GSOFeatures feats = (polygon == null) ? flayer.GetAllFeatures() : flayer.FindFeaturesInPolygon(polygon, false);
@@ -164,7 +166,7 @@
}
FeaturesClassfyResult featuresClass = new FeaturesClassfyResult();
featuresClass.layerName = layer.Caption;
- featuresClass.groupFieldValue = diameter.ToString();
+ featuresClass.groupFieldValue = diameter.ToString(CultureInfo.InvariantCulture);
featuresClass.ncount = ncount;
featuresClass.sum = Math.Round(totalLength, 2);
@@ -183,10 +185,9 @@
///
public List GroupAccessories(GSOGeoPolygon3D polygon, GSOLayer layer)
{
- if (layer == null) return null;
- List result = new List();
-
GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
+ List result = new List();
//layer.Name是表名
string[] accessStrs = Utility.getAccStrsByLayer(layer.Name);
@@ -232,12 +233,12 @@
///
public FeaturesClassfyResult GroupPipeByMaterial(GSOGeoPolygon3D polygon, GSOLayer layer, string material)
{
- if (layer == null) return null;
+
+ GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
FeaturesClassfyResult result = new FeaturesClassfyResult();
- GSOFeatureLayer flayer = layer as GSOFeatureLayer;
-
- //TODOLIST:优化为只获取管线,目前不清楚调用方式
+
GSOFeatures feats = (polygon == null) ? flayer.GetAllFeatures() : flayer.FindFeaturesInPolygon(polygon, false);
string fixedMaterial = material == "无" ? "" : material;
diff --git a/MainFrm.cs b/MainFrm.cs
index 99c2af2..9cbbf68 100644
--- a/MainFrm.cs
+++ b/MainFrm.cs
@@ -3512,59 +3512,104 @@
#region wxl重构未完成
///
+ /// 碰撞分析
+ ///
+ ///
+ ///
+ ///
+ private void CollisionAnalysis(GSOFeature selectedFeature, List pipelineLayerNames, double verticalDistance)
+ {
+ GSOFeatures result = DoublePanelAnalysis.CollisionAnalysis(globeControl1, selectedFeature, pipelineLayerNames);
+ if (result == null)
+ {
+ selectState = 0;
+ MessageBox.Show("请选择一条管线!");
+ return;
+ }
+ string caption = selectedFeature.Dataset.Caption;
+ for (int i =0;i
/// 垂直净距分析,暂时没有在地图上标注
///
///
///
///
-// private void VerticalDistanceAnalysis(GSOFeature selectedFeature, List pipelineLayerNames, double verticalDistance)
-// {
-// Dictionary result =DoublePanelAnalysis.VerticalDistanceAnalysis(globeControl1, selectedFeature, pipelineLayerNames,
-// verticalDistance);
-// if (result == null)
-// {
-// selectState = 0;
-// MessageBox.Show("请选择一条管线!");
-// return;
-// }
-// string caption = selectedFeature.Dataset.Caption;
-// foreach (var kvPairs in result)
-// {
-// GSOFeature feat2 = kvPairs.Key;
-// string feat2Caption = feat2.Dataset.Caption;
-// feat2.HighLight = true;
-//// LabelVerticalDistance(layerTemp, line2 pntIntersect2, kvPairs.Value, true);和水平净距保持一致,暂不做处理
-// var 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 = feat2Caption; // feat2.Dataset.Caption;一致
-// dataGridViewX3.Rows[idx].Cells[3].Value = feat2.Name;
-// dataGridViewX3.Rows[idx].Cells[4].Value = kvPairs.Value.ToString("0.00");
-// GSOGeoPolyline3D line2 = feat2.Geometry as GSOGeoPolyline3D;
-// if (line2 == null) continue;
-// if (m_FeaturesWithBianhao.ContainsKey(selectedFeature.Name + "-" + feat2.Name) == false)
-// {
-// m_FeaturesWithBianhao.Add(selectedFeature.Name + "-" + feat2.Name, markerPosition);//添加飞行位置记录
-// }
-// if (featCount.ContainsKey(feat2Caption))
-// {
-// featCount[feat2Caption] = featCount[feat2Caption] + 1;
-// }
-// else
-// {
-// featCount.Add(feat2Caption, 1);
-// }
-// if (featLenth.ContainsKey(feat2Caption))
-// {
-// featLenth[feat2Caption] = featLenth[feat2Caption] + line2.GetSpaceLength(true, 6378137);
-// }
-// else
-// {
-// featLenth.Add(feat2Caption, line2.GetSpaceLength(true, 6378137));
-// }
-// }
-//
-// }
+ private void VerticalDistanceAnalysis(GSOFeature selectedFeature, List pipelineLayerNames, double verticalDistance)
+ {
+ Dictionary result = DoublePanelAnalysis.VerticalDistanceAnalysis(globeControl1, selectedFeature, pipelineLayerNames,
+ verticalDistance);
+ if (result == null)
+ {
+ selectState = 0;
+ MessageBox.Show("请选择一条管线!");
+ return;
+ }
+ string caption = selectedFeature.Dataset.Caption;
+ foreach (var kvPairs in result)
+ {
+ GSOFeature feat2 = kvPairs.Key;
+ string feat2Caption = feat2.Dataset.Caption;
+ feat2.HighLight = true;
+ // LabelVerticalDistance(layerTemp, line2 pntIntersect2, kvPairs.Value, true);和水平净距保持一致,暂不做处理
+ var 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 = feat2Caption; // feat2.Dataset.Caption;一致
+ dataGridViewX3.Rows[idx].Cells[3].Value = feat2.Name;
+ dataGridViewX3.Rows[idx].Cells[4].Value = kvPairs.Value.ToString("0.00");
+ GSOGeoPolyline3D line2 = feat2.Geometry as GSOGeoPolyline3D;
+ if (line2 == null) continue;
+ // if (m_FeaturesWithBianhao.ContainsKey(selectedFeature.Name + "-" + feat2.Name) == false)
+ // {
+ // m_FeaturesWithBianhao.Add(selectedFeature.Name + "-" + feat2.Name, markerPosition);//添加飞行位置记录
+ // }
+ if (featCount.ContainsKey(feat2Caption))
+ {
+ featCount[feat2Caption] = featCount[feat2Caption] + 1;
+ }
+ else
+ {
+ featCount.Add(feat2Caption, 1);
+ }
+ if (featLenth.ContainsKey(feat2Caption))
+ {
+ featLenth[feat2Caption] = featLenth[feat2Caption] + line2.GetSpaceLength(true, 6378137);
+ }
+ else
+ {
+ featLenth.Add(feat2Caption, line2.GetSpaceLength(true, 6378137));
+ }
+ }
+ }
#endregion
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index d71adec..717170e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/FeatureStatisticsService.cs b/FeatureStatisticsService.cs
index c147e55..cfdaf5c 100644
--- a/FeatureStatisticsService.cs
+++ b/FeatureStatisticsService.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Globalization;
using GeoScene.Data;
using GeoScene.Globe;
@@ -17,9 +18,9 @@
public static GSOFeatures Intersect_PointLayerByType(GSOGeoPolygon3D polygon, GSOLayer layer, string type)
{
- if (layer == null) return null;
-
GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
+
if (polygon == null)
{
@@ -100,9 +101,10 @@
///
public GSOFeatures GetPipesByValueSection(GSOGeoPolygon3D polygon, GSOLayer layer, double? min, double? max, string fieldName)
{
- if (layer == null) return null;
- GSOFeatures result = new GSOFeatures();
+
GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
+ GSOFeatures result = new GSOFeatures();
//TODOLIST:优化为只获取管线,目前不清楚调用方式
GSOFeatures feats = (polygon == null) ? flayer.GetAllFeatures() : flayer.FindFeaturesInPolygon(polygon, false);
@@ -129,10 +131,10 @@
public List GroupPipeByDiameter(GSOGeoPolygon3D polygon, GSOLayer layer)
{
- if (layer == null) return null;
- List result = new List();
-
+
GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
+ List result = new List();
//TODOLIST:优化为只获取管线,目前不清楚调用方式
GSOFeatures feats = (polygon == null) ? flayer.GetAllFeatures() : flayer.FindFeaturesInPolygon(polygon, false);
@@ -164,7 +166,7 @@
}
FeaturesClassfyResult featuresClass = new FeaturesClassfyResult();
featuresClass.layerName = layer.Caption;
- featuresClass.groupFieldValue = diameter.ToString();
+ featuresClass.groupFieldValue = diameter.ToString(CultureInfo.InvariantCulture);
featuresClass.ncount = ncount;
featuresClass.sum = Math.Round(totalLength, 2);
@@ -183,10 +185,9 @@
///
public List GroupAccessories(GSOGeoPolygon3D polygon, GSOLayer layer)
{
- if (layer == null) return null;
- List result = new List();
-
GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
+ List result = new List();
//layer.Name是表名
string[] accessStrs = Utility.getAccStrsByLayer(layer.Name);
@@ -232,12 +233,12 @@
///
public FeaturesClassfyResult GroupPipeByMaterial(GSOGeoPolygon3D polygon, GSOLayer layer, string material)
{
- if (layer == null) return null;
+
+ GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
FeaturesClassfyResult result = new FeaturesClassfyResult();
- GSOFeatureLayer flayer = layer as GSOFeatureLayer;
-
- //TODOLIST:优化为只获取管线,目前不清楚调用方式
+
GSOFeatures feats = (polygon == null) ? flayer.GetAllFeatures() : flayer.FindFeaturesInPolygon(polygon, false);
string fixedMaterial = material == "无" ? "" : material;
diff --git a/MainFrm.cs b/MainFrm.cs
index 99c2af2..9cbbf68 100644
--- a/MainFrm.cs
+++ b/MainFrm.cs
@@ -3512,59 +3512,104 @@
#region wxl重构未完成
///
+ /// 碰撞分析
+ ///
+ ///
+ ///
+ ///
+ private void CollisionAnalysis(GSOFeature selectedFeature, List pipelineLayerNames, double verticalDistance)
+ {
+ GSOFeatures result = DoublePanelAnalysis.CollisionAnalysis(globeControl1, selectedFeature, pipelineLayerNames);
+ if (result == null)
+ {
+ selectState = 0;
+ MessageBox.Show("请选择一条管线!");
+ return;
+ }
+ string caption = selectedFeature.Dataset.Caption;
+ for (int i =0;i
/// 垂直净距分析,暂时没有在地图上标注
///
///
///
///
-// private void VerticalDistanceAnalysis(GSOFeature selectedFeature, List pipelineLayerNames, double verticalDistance)
-// {
-// Dictionary result =DoublePanelAnalysis.VerticalDistanceAnalysis(globeControl1, selectedFeature, pipelineLayerNames,
-// verticalDistance);
-// if (result == null)
-// {
-// selectState = 0;
-// MessageBox.Show("请选择一条管线!");
-// return;
-// }
-// string caption = selectedFeature.Dataset.Caption;
-// foreach (var kvPairs in result)
-// {
-// GSOFeature feat2 = kvPairs.Key;
-// string feat2Caption = feat2.Dataset.Caption;
-// feat2.HighLight = true;
-//// LabelVerticalDistance(layerTemp, line2 pntIntersect2, kvPairs.Value, true);和水平净距保持一致,暂不做处理
-// var 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 = feat2Caption; // feat2.Dataset.Caption;一致
-// dataGridViewX3.Rows[idx].Cells[3].Value = feat2.Name;
-// dataGridViewX3.Rows[idx].Cells[4].Value = kvPairs.Value.ToString("0.00");
-// GSOGeoPolyline3D line2 = feat2.Geometry as GSOGeoPolyline3D;
-// if (line2 == null) continue;
-// if (m_FeaturesWithBianhao.ContainsKey(selectedFeature.Name + "-" + feat2.Name) == false)
-// {
-// m_FeaturesWithBianhao.Add(selectedFeature.Name + "-" + feat2.Name, markerPosition);//添加飞行位置记录
-// }
-// if (featCount.ContainsKey(feat2Caption))
-// {
-// featCount[feat2Caption] = featCount[feat2Caption] + 1;
-// }
-// else
-// {
-// featCount.Add(feat2Caption, 1);
-// }
-// if (featLenth.ContainsKey(feat2Caption))
-// {
-// featLenth[feat2Caption] = featLenth[feat2Caption] + line2.GetSpaceLength(true, 6378137);
-// }
-// else
-// {
-// featLenth.Add(feat2Caption, line2.GetSpaceLength(true, 6378137));
-// }
-// }
-//
-// }
+ private void VerticalDistanceAnalysis(GSOFeature selectedFeature, List pipelineLayerNames, double verticalDistance)
+ {
+ Dictionary result = DoublePanelAnalysis.VerticalDistanceAnalysis(globeControl1, selectedFeature, pipelineLayerNames,
+ verticalDistance);
+ if (result == null)
+ {
+ selectState = 0;
+ MessageBox.Show("请选择一条管线!");
+ return;
+ }
+ string caption = selectedFeature.Dataset.Caption;
+ foreach (var kvPairs in result)
+ {
+ GSOFeature feat2 = kvPairs.Key;
+ string feat2Caption = feat2.Dataset.Caption;
+ feat2.HighLight = true;
+ // LabelVerticalDistance(layerTemp, line2 pntIntersect2, kvPairs.Value, true);和水平净距保持一致,暂不做处理
+ var 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 = feat2Caption; // feat2.Dataset.Caption;一致
+ dataGridViewX3.Rows[idx].Cells[3].Value = feat2.Name;
+ dataGridViewX3.Rows[idx].Cells[4].Value = kvPairs.Value.ToString("0.00");
+ GSOGeoPolyline3D line2 = feat2.Geometry as GSOGeoPolyline3D;
+ if (line2 == null) continue;
+ // if (m_FeaturesWithBianhao.ContainsKey(selectedFeature.Name + "-" + feat2.Name) == false)
+ // {
+ // m_FeaturesWithBianhao.Add(selectedFeature.Name + "-" + feat2.Name, markerPosition);//添加飞行位置记录
+ // }
+ if (featCount.ContainsKey(feat2Caption))
+ {
+ featCount[feat2Caption] = featCount[feat2Caption] + 1;
+ }
+ else
+ {
+ featCount.Add(feat2Caption, 1);
+ }
+ if (featLenth.ContainsKey(feat2Caption))
+ {
+ featLenth[feat2Caption] = featLenth[feat2Caption] + line2.GetSpaceLength(true, 6378137);
+ }
+ else
+ {
+ featLenth.Add(feat2Caption, line2.GetSpaceLength(true, 6378137));
+ }
+ }
+ }
#endregion
diff --git a/bin/x86/Debug/Cyberpipe.exe b/bin/x86/Debug/Cyberpipe.exe
index fdfbf18..0755498 100644
--- a/bin/x86/Debug/Cyberpipe.exe
+++ b/bin/x86/Debug/Cyberpipe.exe
Binary files differ
diff --git a/Cyberpipe.suo b/Cyberpipe.suo
index d71adec..717170e 100644
--- a/Cyberpipe.suo
+++ b/Cyberpipe.suo
Binary files differ
diff --git a/FeatureStatisticsService.cs b/FeatureStatisticsService.cs
index c147e55..cfdaf5c 100644
--- a/FeatureStatisticsService.cs
+++ b/FeatureStatisticsService.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Globalization;
using GeoScene.Data;
using GeoScene.Globe;
@@ -17,9 +18,9 @@
public static GSOFeatures Intersect_PointLayerByType(GSOGeoPolygon3D polygon, GSOLayer layer, string type)
{
- if (layer == null) return null;
-
GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
+
if (polygon == null)
{
@@ -100,9 +101,10 @@
///
public GSOFeatures GetPipesByValueSection(GSOGeoPolygon3D polygon, GSOLayer layer, double? min, double? max, string fieldName)
{
- if (layer == null) return null;
- GSOFeatures result = new GSOFeatures();
+
GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
+ GSOFeatures result = new GSOFeatures();
//TODOLIST:优化为只获取管线,目前不清楚调用方式
GSOFeatures feats = (polygon == null) ? flayer.GetAllFeatures() : flayer.FindFeaturesInPolygon(polygon, false);
@@ -129,10 +131,10 @@
public List GroupPipeByDiameter(GSOGeoPolygon3D polygon, GSOLayer layer)
{
- if (layer == null) return null;
- List result = new List();
-
+
GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
+ List result = new List();
//TODOLIST:优化为只获取管线,目前不清楚调用方式
GSOFeatures feats = (polygon == null) ? flayer.GetAllFeatures() : flayer.FindFeaturesInPolygon(polygon, false);
@@ -164,7 +166,7 @@
}
FeaturesClassfyResult featuresClass = new FeaturesClassfyResult();
featuresClass.layerName = layer.Caption;
- featuresClass.groupFieldValue = diameter.ToString();
+ featuresClass.groupFieldValue = diameter.ToString(CultureInfo.InvariantCulture);
featuresClass.ncount = ncount;
featuresClass.sum = Math.Round(totalLength, 2);
@@ -183,10 +185,9 @@
///
public List GroupAccessories(GSOGeoPolygon3D polygon, GSOLayer layer)
{
- if (layer == null) return null;
- List result = new List();
-
GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
+ List result = new List();
//layer.Name是表名
string[] accessStrs = Utility.getAccStrsByLayer(layer.Name);
@@ -232,12 +233,12 @@
///
public FeaturesClassfyResult GroupPipeByMaterial(GSOGeoPolygon3D polygon, GSOLayer layer, string material)
{
- if (layer == null) return null;
+
+ GSOFeatureLayer flayer = layer as GSOFeatureLayer;
+ if (flayer == null) return null;
FeaturesClassfyResult result = new FeaturesClassfyResult();
- GSOFeatureLayer flayer = layer as GSOFeatureLayer;
-
- //TODOLIST:优化为只获取管线,目前不清楚调用方式
+
GSOFeatures feats = (polygon == null) ? flayer.GetAllFeatures() : flayer.FindFeaturesInPolygon(polygon, false);
string fixedMaterial = material == "无" ? "" : material;
diff --git a/MainFrm.cs b/MainFrm.cs
index 99c2af2..9cbbf68 100644
--- a/MainFrm.cs
+++ b/MainFrm.cs
@@ -3512,59 +3512,104 @@
#region wxl重构未完成
///
+ /// 碰撞分析
+ ///
+ ///
+ ///
+ ///
+ private void CollisionAnalysis(GSOFeature selectedFeature, List pipelineLayerNames, double verticalDistance)
+ {
+ GSOFeatures result = DoublePanelAnalysis.CollisionAnalysis(globeControl1, selectedFeature, pipelineLayerNames);
+ if (result == null)
+ {
+ selectState = 0;
+ MessageBox.Show("请选择一条管线!");
+ return;
+ }
+ string caption = selectedFeature.Dataset.Caption;
+ for (int i =0;i
/// 垂直净距分析,暂时没有在地图上标注
///
///
///
///
-// private void VerticalDistanceAnalysis(GSOFeature selectedFeature, List pipelineLayerNames, double verticalDistance)
-// {
-// Dictionary result =DoublePanelAnalysis.VerticalDistanceAnalysis(globeControl1, selectedFeature, pipelineLayerNames,
-// verticalDistance);
-// if (result == null)
-// {
-// selectState = 0;
-// MessageBox.Show("请选择一条管线!");
-// return;
-// }
-// string caption = selectedFeature.Dataset.Caption;
-// foreach (var kvPairs in result)
-// {
-// GSOFeature feat2 = kvPairs.Key;
-// string feat2Caption = feat2.Dataset.Caption;
-// feat2.HighLight = true;
-//// LabelVerticalDistance(layerTemp, line2 pntIntersect2, kvPairs.Value, true);和水平净距保持一致,暂不做处理
-// var 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 = feat2Caption; // feat2.Dataset.Caption;一致
-// dataGridViewX3.Rows[idx].Cells[3].Value = feat2.Name;
-// dataGridViewX3.Rows[idx].Cells[4].Value = kvPairs.Value.ToString("0.00");
-// GSOGeoPolyline3D line2 = feat2.Geometry as GSOGeoPolyline3D;
-// if (line2 == null) continue;
-// if (m_FeaturesWithBianhao.ContainsKey(selectedFeature.Name + "-" + feat2.Name) == false)
-// {
-// m_FeaturesWithBianhao.Add(selectedFeature.Name + "-" + feat2.Name, markerPosition);//添加飞行位置记录
-// }
-// if (featCount.ContainsKey(feat2Caption))
-// {
-// featCount[feat2Caption] = featCount[feat2Caption] + 1;
-// }
-// else
-// {
-// featCount.Add(feat2Caption, 1);
-// }
-// if (featLenth.ContainsKey(feat2Caption))
-// {
-// featLenth[feat2Caption] = featLenth[feat2Caption] + line2.GetSpaceLength(true, 6378137);
-// }
-// else
-// {
-// featLenth.Add(feat2Caption, line2.GetSpaceLength(true, 6378137));
-// }
-// }
-//
-// }
+ private void VerticalDistanceAnalysis(GSOFeature selectedFeature, List pipelineLayerNames, double verticalDistance)
+ {
+ Dictionary result = DoublePanelAnalysis.VerticalDistanceAnalysis(globeControl1, selectedFeature, pipelineLayerNames,
+ verticalDistance);
+ if (result == null)
+ {
+ selectState = 0;
+ MessageBox.Show("请选择一条管线!");
+ return;
+ }
+ string caption = selectedFeature.Dataset.Caption;
+ foreach (var kvPairs in result)
+ {
+ GSOFeature feat2 = kvPairs.Key;
+ string feat2Caption = feat2.Dataset.Caption;
+ feat2.HighLight = true;
+ // LabelVerticalDistance(layerTemp, line2 pntIntersect2, kvPairs.Value, true);和水平净距保持一致,暂不做处理
+ var 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 = feat2Caption; // feat2.Dataset.Caption;一致
+ dataGridViewX3.Rows[idx].Cells[3].Value = feat2.Name;
+ dataGridViewX3.Rows[idx].Cells[4].Value = kvPairs.Value.ToString("0.00");
+ GSOGeoPolyline3D line2 = feat2.Geometry as GSOGeoPolyline3D;
+ if (line2 == null) continue;
+ // if (m_FeaturesWithBianhao.ContainsKey(selectedFeature.Name + "-" + feat2.Name) == false)
+ // {
+ // m_FeaturesWithBianhao.Add(selectedFeature.Name + "-" + feat2.Name, markerPosition);//添加飞行位置记录
+ // }
+ if (featCount.ContainsKey(feat2Caption))
+ {
+ featCount[feat2Caption] = featCount[feat2Caption] + 1;
+ }
+ else
+ {
+ featCount.Add(feat2Caption, 1);
+ }
+ if (featLenth.ContainsKey(feat2Caption))
+ {
+ featLenth[feat2Caption] = featLenth[feat2Caption] + line2.GetSpaceLength(true, 6378137);
+ }
+ else
+ {
+ featLenth.Add(feat2Caption, line2.GetSpaceLength(true, 6378137));
+ }
+ }
+ }
#endregion
diff --git a/bin/x86/Debug/Cyberpipe.exe b/bin/x86/Debug/Cyberpipe.exe
index fdfbf18..0755498 100644
--- a/bin/x86/Debug/Cyberpipe.exe
+++ b/bin/x86/Debug/Cyberpipe.exe
Binary files differ
diff --git a/bin/x86/Debug/Cyberpipe.pdb b/bin/x86/Debug/Cyberpipe.pdb
index 25eb033..3c8b8f8 100644
--- a/bin/x86/Debug/Cyberpipe.pdb
+++ b/bin/x86/Debug/Cyberpipe.pdb
Binary files differ