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\u003e\u003ccode\u003eNumber.toByte()\u003c/code\u003e casts a given Earth Engine \u003ccode\u003eNumber\u003c/code\u003e to an unsigned 8-bit integer, representing values within the range of 0 to 255.\u003c/p\u003e\n"],["\u003cp\u003eWhen casting floating-point numbers, the decimal precision is lost, resulting in the nearest integer value within the byte range.\u003c/p\u003e\n"],["\u003cp\u003eInput values exceeding the maximum byte value (255) are converted to 255, while values below the minimum (0) are converted to 0.\u003c/p\u003e\n"],["\u003cp\u003eThis function is useful for ensuring data is stored in a compact 8-bit format, which can be beneficial for memory management and data transfer efficiency.\u003c/p\u003e\n"]]],["The `toByte()` method casts a number to an unsigned 8-bit integer, ranging from 0 to 255. Floating-point numbers lose their decimal precision. Numbers exceeding the maximum byte range (255) are set to 255, while numbers below the minimum (0) are set to 0. This method takes an input number and returns it as an 8-bit number.\n"],null,[]]