Ejemplo n.º 1
0
        /// <summary>
        /// Gets the values from the raster. If MaxSampleCount is less than the
        /// number of cells, then it randomly samples the raster with MaxSampleCount
        /// values. Otherwise it gets all the values in the raster.
        /// </summary>
        /// <param name="raster">The raster to sample.</param>
        public void GetValues(IRaster raster)
        {
            Values = raster.GetRandomValues(EditorSettings.MaxSampleCount);
            var keepers = Values.Where(val => val != raster.NoDataValue).ToList();

            Values = keepers;
            Statistics.Calculate(Values);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets the values from the raster.  If MaxSampleCount is less than the
        /// number of cells, then it randomly samples the raster with MaxSampleCount
        /// values.  Otherwise it gets all the values in the raster.
        /// </summary>
        /// <param name="raster">The raster to sample</param>
        public void GetValues(IRaster raster)
        {
            Values = raster.GetRandomValues(EditorSettings.MaxSampleCount);
            List <double> keepers = new List <double>();

            foreach (double val in Values)
            {
                if (val != raster.NoDataValue)
                {
                    keepers.Add(val);
                }
            }
            Values = keepers;
            Statistics.Calculate(Values, raster.Minimum, raster.Maximum);
        }
Ejemplo n.º 3
0
        private void ReadValues()
        {
            if (_isRaster)
            {
                _values = _raster.GetRandomValues(_rasterSymbolizer.EditorSettings.MaxSampleCount);
                _statistics.Calculate(_values);
                if (_values == null)
                {
                    return;
                }
                return;
            }

            _values = _scheme.Values;
            if (_values == null)
            {
                return;
            }
            _scheme.Statistics.Calculate(_values);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Gets the values from the raster.  If MaxSampleCount is less than the
 /// number of cells, then it randomly samples the raster with MaxSampleCount
 /// values.  Otherwise it gets all the values in the raster.
 /// </summary>
 /// <param name="raster">The raster to sample</param>
 public void GetValues(IRaster raster)
 {
     Values = raster.GetRandomValues(EditorSettings.MaxSampleCount);
     Statistics.Calculate(Values, EditorSettings.Min, EditorSettings.Max);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Gets the values from the raster.  If MaxSampleCount is less than the
 /// number of cells, then it randomly samples the raster with MaxSampleCount
 /// values.  Otherwise it gets all the values in the raster.
 /// </summary>
 /// <param name="raster">The raster to sample</param>
 public void GetValues(IRaster raster)
 {
     Values = raster.GetRandomValues(EditorSettings.MaxSampleCount);
     List<double> keepers = new List<double>();
     foreach (double val in Values)
     {
         if (val != raster.NoDataValue)
         {
             keepers.Add(val);
         }
     }
     Values = keepers;
     Statistics.Calculate(Values, raster.Minimum, raster.Maximum);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Gets the values from the raster.  If MaxSampleCount is less than the
 /// number of cells, then it randomly samples the raster with MaxSampleCount
 /// values.  Otherwise it gets all the values in the raster.
 /// </summary>
 /// <param name="raster">The raster to sample</param>
 public void GetValues(IRaster raster)
 {
     Values = raster.GetRandomValues(EditorSettings.MaxSampleCount);
     var keepers = Values.Where(val => val != raster.NoDataValue).ToList();
     Values = keepers;
     Statistics.Calculate(Values, raster.Minimum, raster.Maximum);
 }