ee.Number
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Construit un nouveau nombre.
Utilisation | Renvoie |
---|
ee.Number(number) | Nombre |
Argument | Type | Détails |
---|
number | Nombre|Objet | Nombre ou objet calculé. |
Exemples
Éditeur de code (JavaScript)
print(ee.Number(0)); // 0
print(ee.Number(1)); // 1
print(ee.Number(0.0)); // 0
print(ee.Number(1.0)); // 1
print(ee.Number(-1.0)); // -1
print(ee.Number(Math.PI)); // 3.141592653589793
print(ee.Number(1.2e-35)); // 1.2e-35
print(ee.Number(3.4e10)); // 34000000000
Configuration de Python
Consultez la page
Environnement Python pour en savoir plus sur l'API Python et sur l'utilisation de geemap
pour le développement interactif.
import ee
import geemap.core as geemap
Colab (Python)
import math
print(ee.Number(0).getInfo()) # 0
print(ee.Number(1).getInfo()) # 1
print(ee.Number(0.0).getInfo()) # 0
print(ee.Number(1.0).getInfo()) # 1
print(ee.Number(-1.0).getInfo()) # -1
print(ee.Number(math.pi).getInfo()) # 3.141592653589793
print(ee.Number(1.2e-35).getInfo()) # 1.2e-35
print(ee.Number(3.4e10).getInfo()) # 34000000000
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/26 (UTC).
[null,null,["Dernière mise à jour le 2025/07/26 (UTC)."],[[["\u003cp\u003e\u003ccode\u003eee.Number()\u003c/code\u003e constructs a new Earth Engine Number object from a number or a computed object.\u003c/p\u003e\n"],["\u003cp\u003eIt accepts a single argument, which can be a JavaScript Number, a Python number, or a computed object that resolves to a number.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eee.Number()\u003c/code\u003e is used in both JavaScript and Python Earth Engine APIs to create and manipulate numerical values in Earth Engine computations.\u003c/p\u003e\n"],["\u003cp\u003eYou can print or get the information of the created \u003ccode\u003eee.Number\u003c/code\u003e object using the print function in JavaScript or the \u003ccode\u003egetInfo()\u003c/code\u003e method in Python.\u003c/p\u003e\n"]]],[],null,["# ee.Number\n\n\u003cbr /\u003e\n\nConstructs a new Number.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------|---------|\n| `ee.Number(number)` | Number |\n\n| Argument | Type | Details |\n|----------|----------------|--------------------------------|\n| `number` | Number\\|Object | A number or a computed object. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\nprint(ee.Number(0)); // 0\nprint(ee.Number(1)); // 1\nprint(ee.Number(0.0)); // 0\nprint(ee.Number(1.0)); // 1\nprint(ee.Number(-1.0)); // -1\nprint(ee.Number(Math.PI)); // 3.141592653589793\nprint(ee.Number(1.2e-35)); // 1.2e-35\nprint(ee.Number(3.4e10)); // 34000000000\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\nimport math\n\nprint(ee.Number(0).getInfo()) # 0\nprint(ee.Number(1).getInfo()) # 1\nprint(ee.Number(0.0).getInfo()) # 0\nprint(ee.Number(1.0).getInfo()) # 1\nprint(ee.Number(-1.0).getInfo()) # -1\nprint(ee.Number(math.pi).getInfo()) # 3.141592653589793\nprint(ee.Number(1.2e-35).getInfo()) # 1.2e-35\nprint(ee.Number(3.4e10).getInfo()) # 34000000000\n```"]]