MCPcopy
hub / github.com/google/earthengine-api / computeValue

Function computeValue

python/ee/data.py:1068–1084  ·  view source on GitHub ↗

Sends a request to compute a value. Args: obj: A ComputedObject whose value is desired. Returns: The result of evaluating that object on the server.

(obj: computedobject.ComputedObject)

Source from the content-addressed store, hash-verified

1066
1067
1068def computeValue(obj: computedobject.ComputedObject) -> Any:
1069 """Sends a request to compute a value.
1070
1071 Args:
1072 obj: A ComputedObject whose value is desired.
1073
1074 Returns:
1075 The result of evaluating that object on the server.
1076 """
1077 body = {'expression': serializer.encode(obj, for_cloud_api=True)}
1078 _maybe_populate_workload_tag(body)
1079
1080 return _execute_cloud_call(
1081 _get_cloud_projects()
1082 .value()
1083 .compute(body=body, project=_get_projects_path(), prettyPrint=False)
1084 )['result']
1085
1086
1087@deprecation.Deprecated('Use getThumbId and makeThumbUrl')

Callers

nothing calls this directly

Calls 6

_execute_cloud_callFunction · 0.85
_get_cloud_projectsFunction · 0.85
_get_projects_pathFunction · 0.85
valueMethod · 0.80
encodeMethod · 0.45

Tested by

no test coverage detected