save#
- geetools.ee_computed_object.save(self, path)#
Save a
ComputedObjectto a .gee file.The file contains the JSON representation of the object. it still need to be computed via
getInfo()to be used.- Parameters:
path (os.PathLike) – The path to save the object to.
- Returns:
The path to the saved file.
- Return type:
Examples
from tempfile import TemporaryDirectory from pathlib import Path import ee, geetools from geetools.utils import initialize_documentation initialize_documentation() img = ee.Image("COPERNICUS/S2_SR_HARMONIZED/20200101T100319_20200101T100321_T32TQM") with TemporaryDirectory() as tmp: file = Path(tmp) / "test.gee" img.save(file) print(file.read_text())
{"result": "0", "values": {"0": {"functionInvocationValue": {"functionName": "Image.load", "arguments": {"id": {"constantValue": "COPERNICUS/S2_SR_HARMONIZED/20200101T100319_20200101T100321_T32TQM"}}}}}}