/// <summary> /// 获取栅格图层的属性表 /// </summary> /// <param name="layer">栅格图层</param> /// <param name="queryFilter2">过滤条件</param> /// <returns></returns> public static DataTable GetRasterTableByLayer(ILayer layer, IQueryFilter2 queryFilter2 = null) { ITable iTable = BuildRasterAttributeTable(layer); //ITable iTable = (ITable)layer; //若已存在属性表,直接用该行代码 return(AttributeTableClass.GetAttributeTableByITable(iTable)); }
/// <summary> /// 获取栅格数据集的属性表 /// </summary> /// <param name="geoDataset">输入几何数据集</param> /// <returns></returns> public static DataTable GetRasterTableByGeoDataset(IGeoDataset geoDataset) { IRaster raster = (IRaster)geoDataset; ITable iTable = GetTableByRaster(raster); return(AttributeTableClass.GetAttributeTableByITable(iTable)); }
/// <summary> /// 获取栅格的属性表 /// </summary> /// <param name="raster">栅格</param> /// <returns></returns> public static DataTable GetRasterTableByIRaster(IRaster raster) { ITable iTable = GetTableByRaster(raster); return(AttributeTableClass.GetAttributeTableByITable(iTable)); }