|
|
|
|
using ESRI.ArcGIS.Geodatabase;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using ESRI.ArcGIS.Geometry;
|
|
|
|
|
|
|
|
|
|
namespace Kingo.RuleCheck.AEHelper
|
|
|
|
|
{
|
|
|
|
|
public interface IWorkspaceAPI
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 当前工作空间对象
|
|
|
|
|
/// </summary>
|
|
|
|
|
IWorkspace CurrentWorkspace
|
|
|
|
|
{
|
|
|
|
|
get;
|
|
|
|
|
}
|
|
|
|
|
///// <summary>
|
|
|
|
|
///// 打开工作空间
|
|
|
|
|
///// </summary>
|
|
|
|
|
//IWorkspace OpenWorkspace(string pStrConnection, WorkspaceTypeEnum pWorkspaceType);
|
|
|
|
|
///// <summary>
|
|
|
|
|
///// 打开工作空间
|
|
|
|
|
///// </summary>
|
|
|
|
|
//IWorkspace OpenWorkspace(IWorkspace pWorkspace);
|
|
|
|
|
|
|
|
|
|
IFeatureClassAPI OpenFeatureClass(string pFeatureClassName);
|
|
|
|
|
IFeatureClassAPI OpenFeatureClass2(string pFeatureClassName);
|
|
|
|
|
|
|
|
|
|
ITableAPI OpenTable(string pTableName);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 关闭/释放工作空间
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="compactAccess">关闭工作空间时是否压缩数据库,默认压缩</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
bool CloseWorkspace(bool compactAccess = true);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 创建本地工作空间
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="pPath">指定路径</param>
|
|
|
|
|
IWorkspace CreateLocalWorkspace(string pPath);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 通过路径获取IWorkspace
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="T"></typeparam>
|
|
|
|
|
/// <param name="sFilePath"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
IWorkspace GetWorkspace<T>(string sFilePath) where T : ESRI.ArcGIS.Geodatabase.IWorkspaceFactory, new();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 删除本地工作空间
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="pPath">路径</param>
|
|
|
|
|
bool DeleteLocalWorkspace(string pPath);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 在指定数据集中创建要素类
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="pFeatureClassName">要素类名称</param>
|
|
|
|
|
/// <param name="pFields">字段集合</param>
|
|
|
|
|
/// <param name="pFeatureDataSet">数据集</param>
|
|
|
|
|
IFeatureClassAPI CreateFeatureClass(string pFeatureClassName, IFeatureDataset pFeatureDataset, ISpatialReference pSpatialReference, esriGeometryType esriGeoType = esriGeometryType.esriGeometryPolygon, IFields pFields = null);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 在当前工作空间中创建要素类
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="pFeatureClassName">要素类名称</param>
|
|
|
|
|
/// <param name="pFields">字段集合</param>
|
|
|
|
|
IFeatureClassAPI CreateFeatureClass(string pFeatureClassName, ISpatialReference pSpatialReference, IFields pFields);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="pFeatureClassName"></param>
|
|
|
|
|
/// <param name="pSpatialReference"></param>
|
|
|
|
|
/// <param name="pGeometryType"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
IFeatureClassAPI CreateFeatureClass(string pFeatureClassName, ISpatialReference pSpatialReference, esriGeometryType pGeometryType);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 在当前工作空间中创建表
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="pTableName">表名</param>
|
|
|
|
|
/// <param name="pFields">表字段集合</param>
|
|
|
|
|
ITableAPI CreateTable(string pTableName, IFields pFields);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取数据库下所有的要素类
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="pDatasetType"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Dictionary<string, string> GetFeatureClassName(esriDatasetType pDatasetType);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取数据库下的要素集和要素类
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="pDatasetType"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Dictionary<string, string> GetDataSetAndFeatureClassName(esriDatasetType pDatasetType);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取数据库下所有的属性表
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="pDatasetType"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Dictionary<string, string> GetPropertyTable(esriDatasetType pDatasetType);
|
|
|
|
|
|
|
|
|
|
List<IFeatureClass> GetAllFeatureClass(esriDatasetType pDatasetType);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 删除要素类
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="featureClassName">要删除要素类的名称</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
bool DeleteFeatureClass(string featureClassName);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 是否存在要素类
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="featureClassName"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
bool ExistFeatureClass(string featureClassName);
|
|
|
|
|
}
|
|
|
|
|
}
|