Duyuru:
15 Nisan 2025'ten önce Earth Engine'i kullanmak için kaydedilen tüm ticari olmayan projelerin Earth Engine erişimini sürdürmek için
ticari olmayan uygunluğu doğrulaması gerekir.
ee.Image.where
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Değerlerin koşullu olarak değiştirilmesini sağlar.
"input"un her bandındaki her piksel için, "test"teki karşılık gelen piksel sıfır değilse değerdeki karşılık gelen pikseli, aksi takdirde giriş pikselini çıkış olarak verin.
Belirli bir pikselde test veya değer maskelenmişse giriş değeri kullanılır. Giriş maskelenmişse hiçbir işlem yapılmaz.
Çıkış bantları, giriş bantlarıyla aynı adlara sahiptir. Her bandın çıkış türü, giriş ve değer türlerinden daha büyük olanıdır. Çıkış görüntüsü, giriş görüntüsünün meta verilerini ve ayak izini korur.
Kullanım | İadeler |
---|
Image.where(test, value) | Resim |
Bağımsız Değişken | Tür | Ayrıntılar |
---|
bu: input | Resim | Giriş resmi. |
test | Resim | Test resmi. Bu görüntünün pikselleri, giriş piksellerinden hangisinin döndürüleceğini belirler. Bu tek bir bantsa giriş resmindeki tüm bantlar için kullanılır. Bu bir dizi resmi olmayabilir. |
value | Resim | Testin sıfır olmadığı durumlarda kullanılacak çıkış değeri. Bu tek bir bantsa giriş resmindeki tüm bantlar için kullanılır. |
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-26 UTC.
[null,null,["Son güncelleme tarihi: 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. |"]]