Exemplo n.º 1
0
        private void buttonX_ok_Click(object sender, EventArgs e)
        {
            CGmpPoint xml    = new CGmpPoint();
            bool      result = xml.ReadGmpXML(XMLPath);
            Regex     regNum = new Regex("^[0-9]");

            if (regNum.IsMatch(textBoxX3.Text) == true)
            {
                MessageBox.Show("数据集名称不能以数字开头命名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            if (result == true)
            {
                try
                {
                    IWorkspaceFactory workspaceFactory = new FileGDBWorkspaceFactoryClass();
                    gdbPath = textBoxX2.Text;
                    IFeatureWorkspace        pFeatureWorkspace        = workspaceFactory.OpenFromFile(gdbPath, 0) as IFeatureWorkspace;
                    ISpatialReferenceFactory pSpatialReferenceFactory = new SpatialReferenceEnvironment();

                    //ISpatialReference pSpatialReference = new UnknownCoordinateSystemClass();
                    ISpatialReference pSpatialReference = ClsGDBDataCommon.CreateProjectedCoordinateSystem();
                    pSpatialReference.SetDomain(-8000000, 8000000, -800000, 8000000);
                    IFeatureDataset pFeatureDataset = pFeatureWorkspace.CreateFeatureDataset(textBoxX3.Text, pSpatialReference);
                    IFeatureClass   pFeatureclass   = CreatePointFeatureClass(pFeatureDataset, xml);
                    IFeatureClass   pFCLine         = CreatLineFC(pFeatureDataset, pFeatureclass);
                    if (pFeatureclass == null || pFCLine == null)
                    {
                        MessageBox.Show("数据生成失败", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }

                    IFeatureLayer pFPointLayer = new FeatureLayerClass();
                    pFPointLayer.FeatureClass = pFeatureclass;
                    pFPointLayer.Name         = textBoxX3.Text + "_Gmppoint";

                    IFeatureLayer pFLintLayer = new FeatureLayerClass();
                    pFLintLayer.FeatureClass = pFCLine;
                    pFLintLayer.Name         = textBoxX3.Text + "_GmpLine";

                    m_pMapCtl.AddLayer(pFLintLayer as ILayer, 0);
                    m_pMapCtl.AddLayer(pFPointLayer as ILayer, 0);
                    m_pMapCtl.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);

                    if (cmbImpSymbol.Text != null && symFilePath != null)
                    {
                        ImpSymbolFromFile(symFilePath, pFPointLayer, pFLintLayer);
                    }


                    //MessageBox.Show("数据已经生成", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.Close();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }
            }
        }
Exemplo n.º 2
0
        //创建线图层
        public IFeatureClass CreatLineFC(IFeatureDataset pFeatureDataset, IFeatureClass pPointFClass)
        {
            try
            {
                //建立shape字段
                IFields     pFields     = new FieldsClass();
                IFieldsEdit pFieldsEdit = (IFieldsEdit)pFields;
                IField      pField      = new FieldClass();
                IFieldEdit  pFieldEdit  = (IFieldEdit)pField;
                pFieldEdit.Name_2 = "SHAPE";
                pFieldEdit.Type_2 = esriFieldType.esriFieldTypeGeometry;
                //设置Geometry definition
                IGeometryDef     pGeometryDef     = new GeometryDefClass();
                IGeometryDefEdit pGeometryDefEdit = (IGeometryDefEdit)pGeometryDef;
                pGeometryDefEdit.GeometryType_2     = esriGeometryType.esriGeometryPolyline; //点、线、面
                pGeometryDefEdit.SpatialReference_2 = ClsGDBDataCommon.CreateProjectedCoordinateSystem();
                pFieldEdit.GeometryDef_2            = pGeometryDef;
                pFieldsEdit.AddField(pField);

                //新建字段
                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "Length";       //点类型
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeString;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                IFeatureClass pFeatureClass = pFeatureDataset.CreateFeatureClass(textBoxX3.Text + "_GmpLine", pFields, null, null, esriFeatureType.esriFTSimple, "SHAPE", "");

                FrmPointToLine frmP2L  = new FrmPointToLine(m_pMapCtl.Object as IMapControl3);
                IFeatureLayer  PFLayer = new FeatureLayerClass();
                PFLayer.FeatureClass = pPointFClass;
                IPointCollection pPointColl = frmP2L.ReadPoint(PFLayer);
                List <IPolyline> LineList   = CreatePolyline(pPointColl);

                for (int i = 0; i < LineList.Count; i++)
                {
                    if (LineList[i].Length > 0)
                    {
                        IFeature pFeature = pFeatureClass.CreateFeature();
                        pFeature.Shape = LineList[i];
                        string sLength = ((int)(LineList[i].Length * 100.0) / 100.0).ToString() + "m";
                        pFeature.set_Value(pFeature.Fields.FindField("Length"), sLength);
                        pFeature.Store();
                    }
                }
                return(pFeatureClass);
            }
            catch (System.Exception ex)
            {
                return(null);
            }
        }
Exemplo n.º 3
0
        public IFeatureClass CreatePointFeatureClass(IFeatureDataset pFeatureDataset, CGmpPoint xml)
        {
            try
            {
                //建立shape字段
                IFields     pFields     = new FieldsClass();
                IFieldsEdit pFieldsEdit = (IFieldsEdit)pFields;
                IField      pField      = new FieldClass();
                IFieldEdit  pFieldEdit  = (IFieldEdit)pField;
                pFieldEdit.Name_2 = "Shape";
                pFieldEdit.Type_2 = esriFieldType.esriFieldTypeGeometry;
                //设置Geometry definition
                IGeometryDef     pGeometryDef     = new GeometryDefClass();
                IGeometryDefEdit pGeometryDefEdit = (IGeometryDefEdit)pGeometryDef;
                pGeometryDefEdit.GeometryType_2     = esriGeometryType.esriGeometryPoint; //点、线、面
                pGeometryDefEdit.SpatialReference_2 = ClsGDBDataCommon.CreateProjectedCoordinateSystem();
                pFieldEdit.GeometryDef_2            = pGeometryDef;
                pFieldsEdit.AddField(pField);

                //新建字段
                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "PointType";       //点类型
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeString;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                //新建字段
                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "类型";       //点类型
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeString;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "speed";       //行驶速度
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeDouble;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "规划开始时间";    //规划开始时间
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeString;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "规划时长";       //规划时长
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeString;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "行走开始时间";       //行走开始时间
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeString;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "行走时长";       //行走时长
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeString;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "探测开始时间";       //行走时长
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeString;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "探测时长";       //行走时长
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeString;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "探测结束时间";       //行走时长
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeString;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "太阳方位角";       //太阳方位角
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeDouble;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "地球方位角";       //地球方位角
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeDouble;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);


                IFeatureClass pFeatureClass = pFeatureDataset.CreateFeatureClass(textBoxX3.Text + "_Gmppoint", pFields, null, null, esriFeatureType.esriFTSimple, "SHAPE", "");
                for (int j = 0; j < xml.GmpPointS.Count; j++)
                {
                    IPoint pPoint = new PointClass();
                    pPoint.X = xml.GmpPointS[j].dPointX;
                    pPoint.Y = xml.GmpPointS[j].dPointY;
                    IFeature pFeature = pFeatureClass.CreateFeature();
                    pFeature.Shape = pPoint;
                    pFeature.Store();
                    AddAttributeTable(pFeature, xml.GmpPointS[j], j);
                }

                return(pFeatureClass);
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return(null);
            }
        }
Exemplo n.º 4
0
        public IFeatureClass CreatePointFeatureClass(IFeatureDataset pFeatureDataset, CParkPoint xml)
        {
            try
            {
                //建立shape字段
                IFields     pFields     = new FieldsClass();
                IFieldsEdit pFieldsEdit = (IFieldsEdit)pFields;
                IField      pField      = new FieldClass();
                IFieldEdit  pFieldEdit  = (IFieldEdit)pField;
                pFieldEdit.Name_2 = "Shape";
                pFieldEdit.Type_2 = esriFieldType.esriFieldTypeGeometry;
                //设置Geometry definition
                IGeometryDef     pGeometryDef     = new GeometryDefClass();
                IGeometryDefEdit pGeometryDefEdit = (IGeometryDefEdit)pGeometryDef;
                pGeometryDefEdit.GeometryType_2     = esriGeometryType.esriGeometryPoint; //点、线、面
                pGeometryDefEdit.SpatialReference_2 = ClsGDBDataCommon.CreateProjectedCoordinateSystem();
                pFieldEdit.GeometryDef_2            = pGeometryDef;
                pFieldsEdit.AddField(pField);

                //新建字段
                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "SzID";       //代号
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeString;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "Changed";       //停泊点类型是否改变
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeString;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "Symbol";       //停泊点类型
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeString;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "BegineTime";       //到达停泊点时间
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeString;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "LeaveTime";       //离开停泊点时间
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeString;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "太阳方位角";       //太阳方位角
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeDouble;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "地球方位角";       //地球方位角
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeDouble;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                pField                  = new FieldClass();
                pFieldEdit              = (IFieldEdit)pField;
                pFieldEdit.Name_2       = "WorkModeNum";       //离开停泊点时间
                pFieldEdit.Type_2       = esriFieldType.esriFieldTypeSmallInteger;
                pFieldEdit.IsNullable_2 = true;
                pFieldsEdit.AddField(pField);

                for (int i = 0; i <= 7; i++)
                {
                    pField                  = new FieldClass();
                    pFieldEdit              = (IFieldEdit)pField;
                    pFieldEdit.Name_2       = "Mode_" + i.ToString() + "_symbol";     //第i工作模式名称
                    pFieldEdit.Type_2       = esriFieldType.esriFieldTypeString;
                    pFieldEdit.IsNullable_2 = true;
                    pFieldsEdit.AddField(pField);

                    //pField = new FieldClass();
                    //pFieldEdit = (IFieldEdit)pField;
                    //pFieldEdit.Name_2 = "Mode_" + i.ToString() + "_Name";             //第i工作模式名称
                    //pFieldEdit.Type_2 = esriFieldType.esriFieldTypeString;
                    //pFieldEdit.IsNullable_2 = true;
                    //pFieldsEdit.AddField(pField);

                    pField                  = new FieldClass();
                    pFieldEdit              = (IFieldEdit)pField;
                    pFieldEdit.Name_2       = "Mode_" + i.ToString() + "_Slice";       //第i工作模式固有时长
                    pFieldEdit.Type_2       = esriFieldType.esriFieldTypeDouble;
                    pFieldEdit.IsNullable_2 = true;
                    pFieldsEdit.AddField(pField);

                    pField                  = new FieldClass();
                    pFieldEdit              = (IFieldEdit)pField;
                    pFieldEdit.Name_2       = "Mode_" + i.ToString() + "_AssSlice";       //第i工作模式分配时长
                    pFieldEdit.Type_2       = esriFieldType.esriFieldTypeDouble;
                    pFieldEdit.IsNullable_2 = true;
                    pFieldsEdit.AddField(pField);

                    pField                  = new FieldClass();
                    pFieldEdit              = (IFieldEdit)pField;
                    pFieldEdit.Name_2       = "Mode_" + i.ToString() + "_BeginTime";       //第i工作模式开始时刻
                    pFieldEdit.Type_2       = esriFieldType.esriFieldTypeString;
                    pFieldEdit.IsNullable_2 = true;
                    pFieldsEdit.AddField(pField);

                    pField                  = new FieldClass();
                    pFieldEdit              = (IFieldEdit)pField;
                    pFieldEdit.Name_2       = "Mode_" + i.ToString() + "_EndTime";       //第i工作模式结束时刻
                    pFieldEdit.Type_2       = esriFieldType.esriFieldTypeString;
                    pFieldEdit.IsNullable_2 = true;
                    pFieldsEdit.AddField(pField);

                    //pField = new FieldClass();
                    //pFieldEdit = (IFieldEdit)pField;
                    //pFieldEdit.Name_2 = "Mode_" + i.ToString() + "_Energy";             //第i工作模式结束能量
                    //pFieldEdit.Type_2 = esriFieldType.esriFieldTypeDouble;
                    //pFieldEdit.IsNullable_2 = true;
                    //pFieldsEdit.AddField(pField);
                }

                IFeatureClass pFeatureClass = pFeatureDataset.CreateFeatureClass(textBoxX3.Text + "_parkpoint", pFields, null, null, esriFeatureType.esriFTSimple, "SHAPE", "");
                for (int j = 0; j < xml.uiParkNum; j++)
                {
                    IPoint pPoint = new PointClass();
                    pPoint.X = xml.ParkSList[j].stCoord.dx;
                    pPoint.Y = xml.ParkSList[j].stCoord.dy;
                    IFeature pFeature = pFeatureClass.CreateFeature();
                    pFeature.Shape = pPoint;
                    pFeature.Store();
                    AddAttributeTable(pFeature, xml.ParkSList[j], j);
                }
                return(pFeatureClass);
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return(null);
            }
        }
Exemplo n.º 5
0
        public void creatfeatureclass(string strLayerName)
        {
            //建立shape字段
            IFields     pFields     = new FieldsClass();
            IFieldsEdit pFieldsEdit = (IFieldsEdit)pFields;
            IField      pField      = new FieldClass();
            IFieldEdit  pFieldEdit  = (IFieldEdit)pField;

            pFieldEdit.Name_2 = "Shape";
            pFieldEdit.Type_2 = esriFieldType.esriFieldTypeGeometry;
            //设置Geometry definition
            IGeometryDef     pGeometryDef     = new GeometryDefClass();
            IGeometryDefEdit pGeometryDefEdit = (IGeometryDefEdit)pGeometryDef;

            pGeometryDefEdit.GeometryType_2     = esriGeometryType.esriGeometryPolygon; //点、线、面
            pGeometryDefEdit.SpatialReference_2 = ClsGDBDataCommon.CreateProjectedCoordinateSystem();
            //pGeometryDefEdit.SpatialReference_2 = new UnknownCoordinateSystemClass();
            pFieldEdit.GeometryDef_2 = pGeometryDef;
            pFieldsEdit.AddField(pField);
            //新建字段
            pField                  = new FieldClass();
            pFieldEdit              = (IFieldEdit)pField;
            pFieldEdit.Name_2       = "PointID";       //点位PointID
            pFieldEdit.Type_2       = esriFieldType.esriFieldTypeInteger;
            pFieldEdit.IsNullable_2 = true;
            pFieldsEdit.AddField(pField);
            pField                  = new FieldClass();
            pFieldEdit              = (IFieldEdit)pField;
            pFieldEdit.Name_2       = "X"; //X
            pFieldEdit.Type_2       = esriFieldType.esriFieldTypeDouble;
            pFieldEdit.IsNullable_2 = true;
            pFieldsEdit.AddField(pField);
            pField                  = new FieldClass();
            pFieldEdit              = (IFieldEdit)pField;
            pFieldEdit.Name_2       = "Y";       //Y
            pFieldEdit.Type_2       = esriFieldType.esriFieldTypeDouble;
            pFieldEdit.IsNullable_2 = true;
            pFieldsEdit.AddField(pField);
            pField                  = new FieldClass();
            pFieldEdit              = (IFieldEdit)pField;
            pFieldEdit.Name_2       = "Z";       //Z
            pFieldEdit.Type_2       = esriFieldType.esriFieldTypeDouble;
            pFieldEdit.IsNullable_2 = true;
            pFieldsEdit.AddField(pField);
            pField                  = new FieldClass();
            pFieldEdit              = (IFieldEdit)pField;
            pFieldEdit.Name_2       = "omg";       //omg
            pFieldEdit.Type_2       = esriFieldType.esriFieldTypeDouble;
            pFieldEdit.IsNullable_2 = true;
            pFieldsEdit.AddField(pField);
            pField                  = new FieldClass();
            pFieldEdit              = (IFieldEdit)pField;
            pFieldEdit.Name_2       = "phi";       //phi
            pFieldEdit.Type_2       = esriFieldType.esriFieldTypeDouble;
            pFieldEdit.IsNullable_2 = true;
            pFieldsEdit.AddField(pField);
            pField                  = new FieldClass();
            pFieldEdit              = (IFieldEdit)pField;
            pFieldEdit.Name_2       = "kap";       //kap
            pFieldEdit.Type_2       = esriFieldType.esriFieldTypeDouble;
            pFieldEdit.IsNullable_2 = true;
            pFieldsEdit.AddField(pField);
            pField                  = new FieldClass();
            pFieldEdit              = (IFieldEdit)pField;
            pFieldEdit.Name_2       = "width";       //width
            pFieldEdit.Type_2       = esriFieldType.esriFieldTypeInteger;
            pFieldEdit.IsNullable_2 = true;
            pFieldsEdit.AddField(pField);
            pField                  = new FieldClass();
            pFieldEdit              = (IFieldEdit)pField;
            pFieldEdit.Name_2       = "height";       //height
            pFieldEdit.Type_2       = esriFieldType.esriFieldTypeInteger;
            pFieldEdit.IsNullable_2 = true;
            pFieldsEdit.AddField(pField);
            pField                  = new FieldClass();
            pFieldEdit              = (IFieldEdit)pField;
            pFieldEdit.Name_2       = "fx";       //fx
            pFieldEdit.Type_2       = esriFieldType.esriFieldTypeDouble;
            pFieldEdit.IsNullable_2 = true;
            pFieldsEdit.AddField(pField);
            pField                  = new FieldClass();
            pFieldEdit              = (IFieldEdit)pField;
            pFieldEdit.Name_2       = "fy";       //fy
            pFieldEdit.Type_2       = esriFieldType.esriFieldTypeDouble;
            pFieldEdit.IsNullable_2 = true;
            pFieldsEdit.AddField(pField);
            pField                  = new FieldClass();
            pFieldEdit              = (IFieldEdit)pField;
            pFieldEdit.Name_2       = "f";       //f
            pFieldEdit.Type_2       = esriFieldType.esriFieldTypeDouble;
            pFieldEdit.IsNullable_2 = true;
            pFieldsEdit.AddField(pField);

            try
            {
                pFeatureClass = pFeatureDataset.CreateFeatureClass(strLayerName, pFields, null, null, esriFeatureType.esriFTSimple, "SHAPE", "");
            }
            catch (SystemException eee)
            {
                if (eee.Message == "The table already exists.")
                {
                    ClsGDBDataCommon  cls = new ClsGDBDataCommon();
                    IWorkspace        ws  = pFeatureDataset.Workspace;
                    IFeatureWorkspace fws = ws as IFeatureWorkspace;
                    pFeatureClass = fws.OpenFeatureClass(txtLastYaw.Text);
                    ITable ptable = pFeatureClass as ITable;
                    ptable.DeleteSearchedRows(null);
                }
            }
        }