Image를 줄이려면 image.reduce()를 사용합니다. 이미지 크기 조절은 imageCollection.reduce()와 유사한 방식으로 작동하지만, 이미지의 밴드가 컬렉션의 이미지가 아닌 리듀서에 입력된다는 점을 제외하고는 동일합니다. 출력은 또한 밴드 수가 리듀서 출력 수와 동일한 이미지입니다. 예를 들어 다음과 같습니다.
코드 편집기 (JavaScript)
// Load an image and select some bands of interest. var image = ee.Image('LANDSAT/LC08/C02/T1/LC08_044034_20140318') .select(['B4', 'B3', 'B2']); // Reduce the image to get a one-band maximum value image. var maxValue = image.reduce(ee.Reducer.max()); // Display the result. Map.centerObject(image, 10); Map.addLayer(maxValue, {max: 13000}, 'Maximum value image');
import ee import geemap.core as geemap
Colab (Python)
# Load an image and select some bands of interest. image = ee.Image('LANDSAT/LC08/C02/T1/LC08_044034_20140318').select( ['B4', 'B3', 'B2'] ) # Reduce the image to get a one-band maximum value image. max_value = image.reduce(ee.Reducer.max()) # Display the result. m = geemap.Map() m.center_object(image, 10) m.add_layer(max_value, {'max': 13000}, 'Maximum value image') m