예제 #1
0
        private void ProcessActiveStructureDDC(IGTDDCKeyObjects ddcStructureList)
        {
            try
            {
                foreach (IGTDDCKeyObject ddcobj in ddcStructureList)
                {
                    if ((ddcobj.Geometry.Type == GTGeometryTypeConstants.gtgtOrientedPointGeometry) || (ddcobj.Geometry.Type == GTGeometryTypeConstants.gtgtPointGeometry))
                    {
                        IGTKeyObject koStructure = oDC.OpenFeature(ddcobj.FNO, ddcobj.FID);

                        oRelationService.ActiveFeature = koStructure;

                        IGTKeyObjects koOwnsList = oRelationService.GetRelatedFeatures(2);

                        if (koOwnsList == null)
                        {
                            continue;
                        }

                        if (koOwnsList.Count == 0)
                        {
                            continue;
                        }

                        GTActiveStructure oStructure = new GTActiveStructure();
                        oStructure.G3E_FID = ddcobj.FID;
                        oStructure.G3E_FNO = ddcobj.FNO;
                        IGTOrientedPointGeometry ogeom = ddcobj.Geometry as IGTOrientedPointGeometry;

                        oStructure.OGG_X1 = ogeom.Origin.X;
                        oStructure.OGG_Y1 = ogeom.Origin.Y;
                        oStructure.OGG_Z1 = ogeom.Origin.Z;
                        string sid = CommandUtilities.GetCommonNStructureID(koStructure, oDiag);

                        if (koOwnsList != null)
                        {
                            if (koOwnsList.Count > 0)
                            {
                                foreach (IGTKeyObject koObj in koOwnsList)
                                {
                                    if (koObj.FNO == 56)
                                    {
                                        oStructure.StreetlightKOList.Add(koObj);
                                    }
                                }
                            }
                        }

                        this.oActiveStructureList.Add(oStructure);
                    }
                }
            }
            catch (Exception ex)
            {
                CommandUtilities.LogException(oDiag, "ProcessActiveStreetLightDDC", ex);
                throw ex;
            }
        }