Example #1
0
        private void btnApply_Click(object sender, EventArgs e)
        {
            var fea    = (cmbGrid.SelectedValue as MapPointLayer).DataSet;
            var coords = from ff in fea.Features select ff.Coordinates.First();

            _Mapping.FromDataTable(dataGridView1.DataSource as DataTable);
            foreach (var para in _Paras)
            {
                var array_para = para as ArrayParam <float>;
                int i          = 0;
                foreach (var cc in coords)
                {
                    var cell = _SelectedRaster.ProjToCell(cc);
                    if (cell != null && cell.Row >= 0 && cell.Column >= 0)
                    {
                        var uid = _SelectedRaster.Value[cell.Row, cell.Column].ToString();
                        array_para.Values[i] = _Mapping.Map(para.Name, uid);
                    }
                    i++;
                }
            }
        }