ee.Image.where
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
यह फ़ंक्शन, शर्तों के आधार पर वैल्यू बदलता है.
'input' के हर बैंड में मौजूद हर पिक्सल के लिए, अगर 'test' में मौजूद पिक्सल की वैल्यू शून्य नहीं है, तो वैल्यू में मौजूद पिक्सल को आउटपुट करें. अगर 'test' में मौजूद पिक्सल की वैल्यू शून्य है, तो इनपुट पिक्सल को आउटपुट करें.
अगर किसी पिक्सल पर, टेस्ट या वैल्यू को मास्क किया गया है, तो इनपुट वैल्यू का इस्तेमाल किया जाता है. अगर इनपुट को मास्क किया गया है, तो कुछ नहीं किया जाता है.
आउटपुट बैंड के नाम, इनपुट बैंड के नामों के जैसे ही होते हैं. हर बैंड का आउटपुट टाइप, इनपुट और वैल्यू टाइप में से बड़ा होता है. आउटपुट इमेज में, इनपुट इमेज का मेटाडेटा और फ़ुटप्रिंट मौजूद रहता है.
इस्तेमाल | रिटर्न |
---|
Image.where(test, value) | इमेज |
आर्ग्यूमेंट | टाइप | विवरण |
---|
यह: input | इमेज | इनपुट इमेज. |
test | इमेज | टेस्ट इमेज. इस इमेज के पिक्सल से यह तय होता है कि इनपुट पिक्सल में से कौनसा पिक्सल वापस भेजा जाएगा. अगर यह एक ही बैंड है, तो इसका इस्तेमाल इनपुट इमेज के सभी बैंड के लिए किया जाता है. यह ऐरे इमेज नहीं हो सकती. |
value | इमेज | टेस्ट के शून्य न होने पर, इस्तेमाल की जाने वाली आउटपुट वैल्यू. अगर यह एक ही बैंड है, तो इसका इस्तेमाल इनपुट इमेज के सभी बैंड के लिए किया जाता है. |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 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. |"]]