Example #1
0
        // ICloneable
        public object Clone()
        {
            var clone = new GdalFunctionStore {
                Path = Path, FireEvents = FireEvents
            };

            clone.Open();
            // replace all function names in the cloned store by the current function names (GDAL store may not remember them)
            for (var i = 0; i < Functions.Count; i++)
            {
                clone.Functions[i].Name = Functions[i].Name;
            }
            //if(IsOpen)
            //{
            //    clone.Open();
            //}
            return(clone);
        }
Example #2
0
        // ICloneable

        public object Clone()
        {
            var clone = new GdalFunctionStore {
                FireEvents = FireEvents
            };

            try
            {
                clone.Open(Path);

                // replace all function names in the cloned store by the current function names (GDAL store may not remember them)
                for (var i = 0; i < Functions.Count; i++)
                {
                    clone.Functions[i].Name = Functions[i].Name;
                }
            }
            catch (Exception e)
            {
                // swallow exception because we can be seen as IFeatureProvider
                log.Error("Can't open file: " + Path, e);
            }

            return(clone);
        }
Example #3
0
 public virtual void Open(string path)
 {
     store.Open(path);
 }