Announcement: All noncommercial projects registered to use Earth Engine before April 15, 2025 must verify noncommercial eligibility to maintain Earth Engine access.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[[["\u003cp\u003eThis function creates an image where each pixel's value represents the number of neighboring pixels within a specified range, including itself.\u003c/p\u003e\n"],["\u003cp\u003eUsers can define the neighborhood size using the \u003ccode\u003emaxSize\u003c/code\u003e parameter, with a default value of 100 pixels.\u003c/p\u003e\n"],["\u003cp\u003eThe connectivity type can be controlled with the \u003ccode\u003eeightConnected\u003c/code\u003e parameter, allowing for either 4-connected or 8-connected neighborhood calculations, defaulting to 8-connected.\u003c/p\u003e\n"]]],[],null,["Generate an image where each pixel contains the number of 4- or 8-connected neighbors (including itself).\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------------------------------------------------|---------|\n| Image.connectedPixelCount`(`*maxSize* `, `*eightConnected*`)` | Image |\n\n| Argument | Type | Details |\n|------------------|------------------------|------------------------------------------------------|\n| this: `input` | Image | The input image. |\n| `maxSize` | Integer, default: 100 | The maximum size of the neighborhood in pixels. |\n| `eightConnected` | Boolean, default: true | Whether to use 8-connected rather 4-connected rules. |"]]