I have a large set of points (with longitude and latitude) for which I need to extract the rasters (B1-B8A) in a CSV file. I am currently using geemap.extract_values_to_points.
geemap.extract_values_to_points(
points,
composite_S2 ,
'./data/s2points-raster.csv',
scale = ee.Projection('EPSG:3035').nominalScale())
This works for a smaller section but doing it on a larger set of points yields me the following error:
HttpError Traceback (most recent call last)
File c:\Users\[User]\AppData\Local\Programs\Python\Python38\lib\site-packages\ee\data.py:328, in _execute_cloud_call(call, num_retries)
327 try:
--> 328 return call.execute(num_retries=num_retries)
329 except googleapiclient.errors.HttpError as e:
File c:\Users\[User]\AppData\Local\Programs\Python\Python38\lib\site-packages\googleapiclient\_helpers.py:130, in positional.<locals>.positional_decorator.<locals>.positional_wrapper(*args, **kwargs)
129 logger.warning(message)
--> 130 return wrapped(*args, **kwargs)
File c:\Users\[User]\AppData\Local\Programs\Python\Python38\lib\site-packages\googleapiclient\http.py:938, in HttpRequest.execute(self, http, num_retries)
937 if resp.status >= 300:
--> 938 raise HttpError(resp, content, uri=self.uri)
939 return self.postproc(resp, content)
HttpError: <HttpError 400 when requesting https://earthengine.googleapis.com/v1alpha/projects/earthengine-legacy/value:compute?prettyPrint=false&alt=json returned "Computation timed out.". Details: "Computation timed out.">
During handling of the above exception, another exception occurred:
EEException Traceback (most recent call last)
location-of-notebook\extract-raster-points.ipynb Cell 9 in <module>
----> 1 geemap.extract_values_to_points(points, S2_of_countries_2018 ,'./data/s2points-raster.csv', scale = ee.Projection('EPSG:3035').nominalScale())
File c:\Users\[User]\AppData\Local\Programs\Python\Python38\lib\site-packages\geemap\common.py:7776, in extract_values_to_points(in_fc, image, out_fc, scale, crs, crsTransform, tileScale, stats_type, timeout, proxies, **kwargs)
...
328 return call.execute(num_retries=num_retries)
329 except googleapiclient.errors.HttpError as e:
--> 330 raise _translate_cloud_exception(e)
EEException: Computation timed out.
Looks like I'm running out of memory on gee? Because it works fine on smaller areas. Is there a way to overcome this in GEE? or an alternative way via which I could pull out raster point values from composite images of large polygons? Any piece of knowledge shared is highly appreciated.Thanks!
P.S.: This is the API version (on Python) and not the online CLI version on GEE (that uses javascript).