Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
ee.Reducer.anyNonZero
Stay organized with collections
Save and categorize content based on your preferences.
Returns a Reducer that returns 1 if any of its inputs are non-zero, 0 otherwise. Where applicable, the output name is "any".
Usage | Returns | ee.Reducer.anyNonZero() | Reducer |
No arguments.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-13 UTC.
[null,null,["Last updated 2024-07-13 UTC."],[[["\u003cp\u003eReturns a Reducer that outputs 1 if any input value is non-zero, and 0 otherwise.\u003c/p\u003e\n"],["\u003cp\u003eThe output of this reducer is typically named "any".\u003c/p\u003e\n"],["\u003cp\u003eThis reducer has no arguments and is used to aggregate pixel values within regions of an image.\u003c/p\u003e\n"],["\u003cp\u003eUsage involves calling \u003ccode\u003eee.Reducer.anyNonZero()\u003c/code\u003e.\u003c/p\u003e\n"]]],["The `ee.Reducer.anyNonZero()` function returns a Reducer. This Reducer checks if any input values are non-zero. If at least one input is non-zero, it returns 1; otherwise, it returns 0. The output of this Reducer is named \"any\" when applicable. The function does not accept any arguments.\n"],null,["# ee.Reducer.anyNonZero\n\nReturns a Reducer that returns 1 if any of its inputs are non-zero, 0 otherwise. Where applicable, the output name is \"any\".\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------------|---------|\n| `ee.Reducer.anyNonZero()` | Reducer |\n\n**No arguments.**"]]