IFeatureClass pFeatCls = (IFeatureClass)node.Tag;
//统一坐标系 if (pFeatCls != null) { if (pMapControl.LayerCount != 0) { IGeoDataset feaGeoDs = null; for (int i = 0; i < pMapControl.LayerCount; i++) { IFeatureLayer feaLayer = pMapControl.get_Layer(i) as IFeatureLayer; if (feaLayer != null) { IFeatureClass feaClass = feaLayer.FeatureClass; feaGeoDs = feaClass as IGeoDataset; if (feaGeoDs != null) { break; } } } IGeoDataset pGeoDataset = pFeatCls as IGeoDataset; IGeoDatasetSchemaEdit pGeoDatasetSchemaEdit = pGeoDataset as IGeoDatasetSchemaEdit; pGeoDatasetSchemaEdit.AlterSpatialReference(feaGeoDs.SpatialReference);