Exemplo n.º 1
0
        /// <summary>
        /// 复制获取临时栅格数据集
        /// </summary>
        /// <param name="rasterLayerFile">栅格图层文件</param>
        /// <returns></returns>
        public static IRasterDataset CopyAsTempRasterDataset(string rasterLayerFile)
        {
            //复制原始栅格为临时栅格
            string tempFile = TempFile.CreateNewTempFile();

            CopyRasterLayer(rasterLayerFile, tempFile);
            return(RasterDataInfoClass.GetRasterDataset(tempFile));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 复制栅格图层
        /// </summary>
        /// <param name="inFile">输入路径</param>
        /// <param name="outFile">输出路径</param>
        public static ILayer CopyRasterLayer(string inFile, string outFile)
        {
            IRasterDataset rasterDataset = RasterDataInfoClass.GetRasterDataset(inFile);

            return(DatasetHelper.CopyDatasetAsRasterLayer(rasterDataset as IDataset, outFile));
        }
Exemplo n.º 3
0
        /// <summary>
        /// 建立默认属性表
        /// </summary>
        /// <param name="rasterLayer"></param>
        private static void BuildRasterAttributeTable(IRasterLayer rasterLayer)
        {
            IRasterDataset rasterDataset = RasterDataInfoClass.GetRasterDataset(rasterLayer.FilePath);

            BuildRasterAttributeTable(rasterDataset);
        }