public GisTrafficToPolygonCreater(GeoXYLine sourceLine, GeoUserVectorData userVectorData, double stripWidth) { this.m_SourceLine = sourceLine; this.m_PolyRegionExe = new PolyRegionExe(GeoNameControl.Instance); this.m_WidthOfStrip = stripWidth; this.m_XPositiveList = new List<GeoXYPoint>(); this.m_XOppositeList = new List<GeoXYPoint>(); this.m_PolyList = new List<GeoPolygon>(); this.m_GisLinePairList = new List<GisLinePair>(); this.m_PolyRegionDict = new Dictionary<int, GeoPolygonRegion>(); this.m_BaseData = userVectorData; List<GeoPolygonRegion> allPolygons = this.m_BaseData.GetAllPolygons(); foreach (GeoPolygonRegion region in allPolygons) { if (!this.m_PolyRegionDict.ContainsKey(region.ID)) { this.m_PolyRegionDict.Add(region.ID, region); } } GeoNameControl.Instance.PolygonRegionDict = this.m_PolyRegionDict; }
private void Init(GeoUserVectorData polygonLayer, GeoTransformation trans) { this.InitializeComponent(); this.m_PolyRegionDict = new Dictionary<int, GeoPolygonRegion>(); this.m_PolygonDict = new Dictionary<int, List<Huawei.UNet.GIS.GeoUI.Polygon>>(); this.m_PolygonIDList = new List<int>(); this.m_PolyRegionExe = new PolyRegionExe(this.m_geoNameControl); this.m_PolyRegionList = polygonLayer.GetAllPolygons(); this.m_Transformation = trans.Clone(); foreach (GeoPolygonRegion region in this.m_PolyRegionList) { this.SetPolygonArea(region); } foreach (GeoPolygonRegion region in this.m_PolyRegionList) { this.m_PolyRegionDict.Add(region.ID, region); this.TransformPolygonDict(region.ID, region); } this.AddListViewItem(); this.rdbIntersect.Checked = true; }