Exemple #1
0
 public FitModel(SpatialContinuity spatial, Model initialModel)
 {
     this.model = SelectModel(initialModel);
     this.model.C0 = 0;
     this.model.C1 = spatial.SemivarianceStatistic.Max;
     this.model.Range = spatial.NumberOfLags * spatial.LagSize / 3;
 }
        private void StartKriging()
        {
            dataK = new Kriging(this._data, 6);
            spatial = new SpatialContinuity(dataK.GetDataSource());
            anisotropy = new AnisotropyValues(spatial);
            semiGraph = new SemivarianceCovarianceGraph(zedGraphControl1, spatial);
            semiGraph.Graph();
            theoretical = new TheoreticalModel(spatial);
            IKrigingModel model = theoretical.GetFunctionDefault();
            semiGraph.DrawCurve(theoretical.GetFunctionDefault());
            theoreticalModelControl1.TheoreticalModel = theoretical;

            kriggingResult.Field = this._field;
            kriggingResult.Extent = JsonConvert.SerializeObject(this._extent);
            kriggingResult.Clip = JsonConvert.SerializeObject(this._clip);
        }
 public AnisotropyValues(SpatialContinuity spatial) 
 {
     this.spatial = spatial;
     this.azimuth = Utils.ToRad(0);
     this.angdip2 = Utils.ToRad(0);
     this.tolerance = Utils.ToRad(45);
     this.bandWidth = 3;
     CalculateListValues();
 }
Exemple #4
0
        private void StartKriging()
        {
            //8--> used field

            if (env.Method == "Ordinary Kriging")
                dataK = new Kriging(env.Data, 6);

            if (env.Method == "Simple Kriging")
                dataK = new SimpleKriging(env.Data, 6);

            if (env.Method == "Universal Kriging")
                dataK = new UniversalKriging(env.Data, 6);


            spatial = new SpatialContinuity(dataK.GetDataSource());

            anisotropy = new AnisotropyValues(spatial);

            anisotropyControl1.SetAnisotropy(anisotropy);



            spatial.ChangedLagParameter += new EventHandler(Spatial_ChangedLagParameter);
            anisotropy.ChangedAnisotropyParameter += new EventHandler(Spatial_ChangedAnisotropyParameter);


            uxContinuity.ValuesMinMax = new double[2] { 0, spatial.SemivarianceStatistic.Max };

            uxLag.Spatial = spatial;
            uxLag.NumberOfLags = spatial.NumberOfLags.ToString();
            uxLag.LagSize = spatial.LagSize.ToString();
            uxLag.Tolerance = spatial.LagValue.tolerance.ToString();
            uxLag.EnableUpdateLag();

            uxContinuity.SetSurface(spatial.Surface(Path.GetTempPath() + "\\t2.bgd"));

            semiGraph = new SemivarianceCovarianceGraph(zedGraphControl1, spatial);
            semiGraph.Graph();
            theoretical = new TheoreticalModel(spatial);
            IKrigingModel model = theoretical.GetFunctionDefault();


            semiGraph.DrawCurve(theoretical.GetFunctionDefault());

            theoreticalModelControl1.TheoreticalModel = theoretical;
            uxContinuity.SetLayer(spatial.InfluenceZone(theoretical.KrigingModel.Range, theoretical.KrigingModel.Range, 0));
            theoretical.ChangedKriginParameter += new EventHandler(theoretical_ChangedKriginParameter);
            theoreticalModelControl1.ChangedAnisotropyParameter += new EventHandler(theoreticalModelControl1_ChangedAnisotropyParameter);



        }