AE实现统计栅格图层的波段值、行数、列数

it2024-07-04  47

栅格波段:也叫波普段或波普带。在电磁波中,具有确定波长范围的连续电磁波。

不同的栅格图层具有的波段数不一样,有单波段的图层,也有多波段的图层。

多波段图层示意图:

//获取波段数 private void button1_Click(object sender, EventArgs e) { IRasterLayer lyr = axMapControl1.get_Layer(0) as IRasterLayer; int bandcount = lyr.BandCount; MessageBox.Show(bandcount.ToString()); } //统计行数 private void button2_Click(object sender, EventArgs e) { IRasterLayer lyr = axMapControl1.get_Layer(0) as IRasterLayer; int row = lyr.RowCount; MessageBox.Show(row.ToString()); } //获取列数,像元个数就是行列数相乘 private void button3_Click(object sender, EventArgs e) { IRasterLayer lyr = axMapControl1.get_Layer(0) as IRasterLayer; int column = lyr.ColumnCount; MessageBox.Show(column.ToString()); }
最新回复(0)