Sentinel 2 extract values to points error #1023
singhamninder
started this conversation in
General
Replies: 1 comment
-
Update: I was able to resolve this issue by providing projection and scale in the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear Dr. Wu,
I am using the following code to extract time-series values from a multiband Sentinel-2 image. I have a CSV file with all the points to which I want to extract the values. However, I am getting an error. Could you please provide any insight into this?
Thanks!
HttpError Traceback (most recent call last)
File ~\Anaconda3\envs\ee\lib\site-packages\ee\data.py:330, in _execute_cloud_call(call, num_retries)
329 try:
--> 330 return call.execute(num_retries=num_retries)
331 except googleapiclient.errors.HttpError as e:
File ~\Anaconda3\envs\ee\lib\site-packages\googleapiclient_helpers.py:134, in positional..positional_decorator..positional_wrapper(*args, **kwargs)
133 logger.warning(message)
--> 134 return wrapped(*args, **kwargs)
File ~\Anaconda3\envs\ee\lib\site-packages\googleapiclient\http.py:915, in HttpRequest.execute(self, http, num_retries)
914 if resp.status >= 300:
--> 915 raise HttpError(resp, content, uri=self.uri)
916 return self.postproc(resp, content)
HttpError: <HttpError 500 when requesting https://earthengine.googleapis.com/v[1](vscode-notebook-cell:/c%3A/Users/amninder.singh/Project/eeproject.ipynb#ch0000059?line=0)alpha/projects/earthengine-legacy/value:compute?prettyPrint=false&alt=json returned "Unable to compute error margin in invalid area of projection (EPSG:32617: affine [10.0, 0.0, 399960.0, 0.0, -10.0, 2800020.0] in Rectangle(15000.0,-771372.0, 15001.0,-771371.0)).". Details: "Unable to compute error margin in invalid area of projection (EPSG:32617: affine [10.0, 0.0, 399960.0, 0.0, -10.0, 2800020.0] in Rectangle(15000.0,-771372.0, 15001.0,-771371.0)).">
During handling of the above exception, another exception occurred:
EEException Traceback (most recent call last)
c:\Users\amninder.singh\OneDrive - email.ucr.edu\eeproject.ipynb Cell 57' in <cell line: 1>()
----> 1 geemap.extract_values_to_points(path_aqspy, timeseries_s2, out_csv)
File ~\Anaconda3\envs\ee\lib\site-packages\geemap\common.py:6140, in extract_values_to_points(in_fc, image, out_fc, scale, crs, crsTransform, tileScale, stats_type, **kwargs)
6130 result = image.reduceRegions(
6131 collection=in_fc,
6132 reducer=allowed_stats[stats_type.upper()],
(...)
6136 tileScale=tileScale,
6137 )
6139 if out_fc is not None:
-> 6140 ee_export_vector(result, out_fc)
6141 else:
6142 return result
File ~\Anaconda3\envs\ee\lib\site-packages\geemap\common.py:1416, in ee_export_vector(ee_object, filename, selectors, verbose, keep_zip, timeout)
1413 raise ValueError
1415 if selectors is None:
-> 1416 selectors = ee_object.first().propertyNames().getInfo()
1417 if filetype == "csv":
1418 # remove .geo coordinate field
1419 ee_object = ee_object.select([".*"], None, False)
File ~\Anaconda3\envs\ee\lib\site-packages\ee\computedobject.py:98, in ComputedObject.getInfo(self)
92 def getInfo(self):
93 """Fetch and return information about this object.
94
95 Returns:
96 The object can evaluate to anything.
97 """
---> 98 return data.computeValue(self)
File ~\Anaconda3\envs\ee\lib\site-packages\ee\data.py:735, in computeValue(obj)
726 def computeValue(obj):
727 """Sends a request to compute a value.
728
729 Args:
(...)
733 The result of evaluating that object on the server.
734 """
--> 735 return _execute_cloud_call(
736 _get_cloud_api_resource().projects().value().compute(
737 body={'expression': serializer.encode(obj, for_cloud_api=True)},
738 project=_get_projects_path(),
739 prettyPrint=False))['result']
File ~\Anaconda3\envs\ee\lib\site-packages\ee\data.py:332, in _execute_cloud_call(call, num_retries)
330 return call.execute(num_retries=num_retries)
331 except googleapiclient.errors.HttpError as e:
--> 332 raise _translate_cloud_exception(e)
EEException: Unable to compute error margin in invalid area of projection (EPSG:32617: affine [10.0, 0.0, 399960.0, 0.0, -10.0, 2800020.0] in Rectangle(15000.0,-771372.0, 15001.0,-771371.0)).
Beta Was this translation helpful? Give feedback.
All reactions