Git Product home page Git Product logo

Comments (8)

giswqs avatar giswqs commented on July 28, 2024

@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.

image

from xee.

spatialthoughts avatar spatialthoughts commented on July 28, 2024

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.

spatialthoughts avatar spatialthoughts commented on July 28, 2024

Actually this was reported in #96 and seems to be fixed already.

from xee.

giswqs avatar giswqs commented on July 28, 2024

@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.

image

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')

image

from xee.

dabhicusp avatar dabhicusp commented on July 28, 2024

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.

ESimonson95 avatar ESimonson95 commented on July 28, 2024

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.

dabhicusp avatar dabhicusp commented on July 28, 2024

Hello @ESimonson95 I added the PR #121 which resolves this error.

from xee.

dabhicusp avatar dabhicusp commented on July 28, 2024

Hey @giswqs Can you close this issue as PR #121 merged into the main which resolved this issue.

from xee.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.