예제 #1
0
        private bool SaveDatasource(IDatasource ds, string filename)
        {
            if (!GeoSource.Remove(filename))
            {
                return(HandleOverwriteFailure());
            }

            if (LayerSourceHelper.Save(ds, filename))
            {
                Logger.Current.Info("Layer ({0}) is created.", filename);
                return(true);
            }

            Logger.Current.Error("Failed to save datasource: " + ds.LastError);
            return(false);
        }