Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
ee.Geometry.s2Cell
Stay organized with collections
Save and categorize content based on your preferences.
Constructs the Polygon corresponding to an S2 cell id.
Usage | Returns | ee.Geometry.s2Cell(cellId) | Geometry |
Argument | Type | Details | cellId | Long | The S2 cell id as 64 bit integer. From Javascript, which does not support integers larger than 53 bits, use fromS2CellToken instead. |
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\u003eConstructs an Earth Engine Geometry representing the Polygon of a given S2 cell ID.\u003c/p\u003e\n"],["\u003cp\u003eThe function \u003ccode\u003eee.Geometry.s2Cell()\u003c/code\u003e takes an S2 cell ID as input and returns the corresponding Geometry object.\u003c/p\u003e\n"],["\u003cp\u003eS2 cell IDs should be provided as 64-bit integers, but for JavaScript users, the \u003ccode\u003efromS2CellToken\u003c/code\u003e method is recommended due to limitations with large integers.\u003c/p\u003e\n"]]],["The function `ee.Geometry.s2Cell(cellId)` creates a Polygon Geometry from an S2 cell ID. It accepts a 64-bit integer (`cellId`) representing the S2 cell. Due to JavaScript's limitations with integers larger than 53 bits, the method `fromS2CellToken` is suggested as an alternative. The function returns a Geometry object.\n"],null,["# ee.Geometry.s2Cell\n\nConstructs the Polygon corresponding to an S2 cell id.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|------------------------------|----------|\n| `ee.Geometry.s2Cell(cellId)` | Geometry |\n\n| Argument | Type | Details |\n|----------|------|--------------------------------------------------------------------------------------------------------------------------------------|\n| `cellId` | Long | The S2 cell id as 64 bit integer. From Javascript, which does not support integers larger than 53 bits, use fromS2CellToken instead. |"]]