-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spatial coordinates are lost with execute_local_udf #549
Comments
example: import openeo
from openeo.udf import execute_local_udf
udf = openeo.UDF("""
import xarray
def apply_datacube(cube: xarray.DataArray, context: dict) -> xarray.DataArray:
print(f"{cube.coords['t']=}")
print(f"{cube.coords['x']=}")
print(f"{cube.coords['y']=}")
return cube
""")
res = execute_local_udf(udf=udf, datacube="tmp.nc") results in
Note how the x and y coordinates are just non-georeferenced ranges |
I found that the original coordinates are explicitly dropped here: openeo-python-client/openeo/udf/run_code.py Line 232 in 70b43f2
Dropping the original coordinates was in the original implementation of |
merged in eddfa77 |
from https://discuss.eodc.eu/t/how-to-export-udfdata/705
execute_local_udf
does not allow access to georeferenced x/y coordinatesThe text was updated successfully, but these errors were encountered: