很多时候我们需要加载不同范围影像,从而体现出影像的的整体差异性效果,例如我们用不同的颜色加载不同高程范围内的影像。从而更加明显的区分出颜色。这里我们使用where来进行区分不同至于范围内的值,然后分别给其划分等级,这里我们可以看到两个参数需要输入,也就是我们第一个test是我们所要测试的值,而value值则是我们图层要赋予的值,也就是我们每一次调用where都需要给定一个值,与之我们所给定的颜色图层一一对应,这样我们就可以在加载影像的时候自动匹配我们对应的颜色。我们首先来看一下函数:where(test,value)Performs conditional replacement of values.For each pixel in each band of 'input', if the corresponding pixel in 'test' is nonzero, output the corresponding pixel in value, otherwise output the input pixel.If at a given pixel, either test or value is masked, the input value is used. If the input is masked, nothing is done.The output bands have the same names as the input bands. The output type of each band is the l