Esempio n. 1
0
        //---------------------------------------------------------------------


        IOutputRaster <TPixel> IRasterFactory.CreateRaster <TPixel>(string path,
                                                                    Dimensions dimensions)
        {
            try {
                string dir = System.IO.Path.GetDirectoryName(path);
                if (dir.Length > 0)
                {
                    Edu.Wisc.Forest.Flel.Util.Directory.EnsureExists(dir);
                }
                return(rasterFactory.CreateRaster <TPixel>(path, dimensions));
            }
            catch (System.IO.IOException exc) {
                string mesg = string.Format("Error opening map \"{0}\"", path);
                throw new MultiLineException(mesg, exc);
            }
        }
Esempio n. 2
0
 public IOutputRaster <TPixel> CreateRaster <TPixel>(string path,
                                                     Dimensions dimensions)
     where TPixel : Pixel, new()
 {
     return(rasterFactory.CreateRaster <TPixel>(path, dimensions));
 }