Comments (8)
@spatialthoughts I encountered the same issue with your xee notebook example - extracting_time_series_xee.ipynb. Even though you open the dataset with crs='EPSG:32643'
, the XY coordinates are still in EPSG:4326
. This is problematic when trying to save the image with image.rio.to_raster()
. The output crs is always EPSG:4326
.
from xee.
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
from xee.
Actually this was reported in #96 and seems to be fixed already.
from xee.
@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 geometry
is not specified, it will fail. If the image footprint image.geometry()
is used as the geometry, the output raster will have some zero-value on the image edge, resulting in some black strips.
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')
from xee.
Hello @giswqs,
Can you reinstall xee as the error you mentioned above is already resolved into this new release.
Now coming to this ...
geometry is not specified, it throws an error. I would expect it to use the image geometry if it is not specified.
Please refer to tool's default behaviour :
geometry: Specify an `ee.Geometry` to define the regional bounds when opening the data. When not set, the bounds are defined by the CRS's 'area_of_use` boundaries. If those aren't present, the bounds are derived from the geometry of the first image of the collection.
Code reference.
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.
from xee.
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 ee.Geometey.Rectangle()
and used it as a parameter to open up the xarray dataset but received the following error message: ValueError: need at least one array to concatenate
. When I removed this parameter, I was able to pass the image collection to the xarray without any problems. Here is a link to my code for reference. Am I doing something wrong here?
from xee.
Hello @ESimonson95 I added the PR #121 which resolves this error.
from xee.
Hey @giswqs Can you close this issue as PR #121 merged into the main which resolved this issue.
from xee.
Related Issues (20)
- Scaling Considerations
- ValueError: unrecognized engine ee must be one of: ['scipy', 'rasterio', 'store'] HOT 1
- download MODIS (crs: SR-ORG:6974) data appears obscured HOT 8
- Opening a MODIS dataset brings seemingly random values across, rest are 0 HOT 5
- Long-running code results in `requests` `ChunkedEncodingError` exception (broken connection) HOT 1
- Xee and SSL HOT 3
- Transposing MODIS data introduces data artifacts HOT 1
- Missing values outside ee.Image boundaries potentially in data range
- Documentation infra HOT 11
- Inconsistent Dimensions When Loading Processed ImageCollection HOT 3
- Add docs for running integration tests locally
- Xee does not provide correct data for resampled image HOT 3
- Error when Xee attempts to cast image data to an expected dtype HOT 2
- FeatureCollection integration with Dask Dataframes HOT 9
- Error when passing in ee.Projection() as parameter for open_dataset() HOT 2
- Output change for the same code HOT 2
- Cannot pin specific version of xee in my conda recipe
- Start testing GIL-free python
- How do I use io_chunks to let xee auto-compute a chunk size relative to the request byte limit?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xee.