공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증해야 합니다.
ee.Image.where
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
값의 조건부 대체를 실행합니다.
'input'의 각 밴드에 있는 각 픽셀에 대해 'test'의 해당 픽셀이 0이 아닌 경우 값의 해당 픽셀을 출력하고, 그렇지 않으면 입력 픽셀을 출력합니다.
특정 픽셀에서 테스트 또는 값이 마스크 처리된 경우 입력 값이 사용됩니다. 입력이 마스크 처리된 경우 아무 작업도 실행되지 않습니다.
출력 밴드의 이름은 입력 밴드와 동일합니다. 각 밴드의 출력 유형은 입력 유형과 값 유형 중 더 큰 유형입니다. 출력 이미지는 입력 이미지의 메타데이터와 설치 공간을 유지합니다.
사용 | 반환 값 |
---|
Image.where(test, value) | 이미지 |
인수 | 유형 | 세부정보 |
---|
다음과 같은 경우: input | 이미지 | 입력 이미지입니다. |
test | 이미지 | 테스트 이미지입니다. 이 이미지의 픽셀은 반환되는 입력 픽셀을 결정합니다. 단일 밴드인 경우 입력 이미지의 모든 밴드에 사용됩니다. 배열 이미지가 아닐 수 있습니다. |
value | 이미지 | 테스트가 0이 아닌 경우 사용할 출력 값입니다. 단일 밴드인 경우 입력 이미지의 모든 밴드에 사용됩니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003eReplaces input image pixel values with values from a secondary image based on a test image's pixel values.\u003c/p\u003e\n"],["\u003cp\u003eIf the test image pixel is non-zero, the corresponding pixel from the value image is used; otherwise, the original input pixel is retained.\u003c/p\u003e\n"],["\u003cp\u003eInput image metadata and footprint are preserved in the output image.\u003c/p\u003e\n"],["\u003cp\u003eOutput image band types are determined by the larger type between the input and value images.\u003c/p\u003e\n"],["\u003cp\u003eMasked pixels in either test or value images result in the original input pixel being used in the output.\u003c/p\u003e\n"]]],[],null,["# ee.Image.where\n\nPerforms conditional replacement of values.\n\n\u003cbr /\u003e\n\nFor 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.\n\nIf at a given pixel, either test or value is masked, the input value is used. If the input is masked, nothing is done.\n\nThe output bands have the same names as the input bands. The output type of each band is the larger of the input and value types. The output image retains the metadata and footprint of the input image.\n\n| Usage | Returns |\n|----------------------------|---------|\n| Image.where`(test, value)` | Image |\n\n| Argument | Type | Details |\n|---------------|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `input` | Image | The input image. |\n| `test` | Image | The test image. The pixels of this image determines which of the input pixels is returned. If this is a single band, it is used for all bands in the input image. This may not be an array image. |\n| `value` | Image | The output value to use where test is not zero. If this is a single band, it is used for all bands in the input image. |"]]