-
Notifications
You must be signed in to change notification settings - Fork 29
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
crs and geometry not working properly #118
Comments
@spatialthoughts I encountered the same issue with your xee notebook example - extracting_time_series_xee.ipynb. Even though you open the dataset with |
Yes. This is a bug. It uses the specified CRS and resolution to request the pixels, but the result is always in EPSG:4326. One must explicitly reproject it to another CRS before saving the raster. There is a FR open for this #45 |
Actually this was reported in #96 and seems to be fixed already. |
@spatialthoughts Thank you for looking into this. I can confirm that the crs issue has been fixed by @boothmanrylan in #97. However, the geometry issue still exists. If the import ee
import xarray
ee.Initialize(opt_url='https://earthengine-highvolume.googleapis.com')
image = ee.Image("LANDSAT/LC08/C02/T1_TOA/LC08_044034_20140318")
ic = ee.ImageCollection(image)
ds = xarray.open_dataset(ic, crs='EPSG:32610', scale=300, engine='ee', geometry=image.geometry())
image = ds.isel(time=0).rename({'Y': 'y', 'X': 'x'}).transpose('y', 'x').rio.write_crs("EPSG:32610")
image.rio.to_raster('test.tif', driver='COG') |
Hello @giswqs, Can you reinstall xee as the error you mentioned above is already resolved into this new release. Now coming to this ...
Please refer to tool's default behaviour : So as per the default behaviour if you don't pass any geometry then the bounds are defined by the CRS's 'area_of_use` boundaries. But there was an issue related to how we are processing data so I have raised the #121 that will resolve it. Thanks. |
Hello, I am not sure if my specific issue is relevant to this chain but I am having difficulties opening up an xarray dataset. I am following this example... XEE: Geospatial analysis made easier - a tutorial & code. I created a |
Hello @ESimonson95 I added the PR #121 which resolves this error. |
If geometry is not specified, it throws an error. I would expect it to use the image geometry if it is not specified.
By specifying the geometry, it can open the dataset successfully. However, it seems the XY coordinates are always in EPSG:4326 no matter what crs is specified.
The text was updated successfully, but these errors were encountered: