Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

basins_stats.compute fails with basins_gdf argument #147

Closed
jsta opened this issue Nov 1, 2022 · 3 comments
Closed

basins_stats.compute fails with basins_gdf argument #147

jsta opened this issue Nov 1, 2022 · 3 comments

Comments

@jsta
Copy link
Member

jsta commented Nov 1, 2022

Even with a tiny polygon object, the earthengine API says:

ee.ee_exception.EEException: Object too large (4000000016 bytes).

You can pass an asset path with the gee_feature_path argument to get around this error.

@jsta jsta self-assigned this Nov 1, 2022
@jsta jsta changed the title Failing tests basins_stats.compute fails with basins_gdf argument Nov 1, 2022
@jsta jsta removed their assignment Nov 1, 2022
@jonschwenk
Copy link
Collaborator

This could have happened because I was maxxing out rabpro's GEE memory with other runs. Those have been cancelled so maybe try again? Or if you were using your personal GEE account then it's a real bug.

@jsta
Copy link
Member Author

jsta commented Nov 3, 2022

I was using my personal account.

@jsta jsta pinned this issue Jul 21, 2023
@jsta
Copy link
Member Author

jsta commented Jul 25, 2023

Works:

  • all basin stats queries using a vector asset already on GEE

  • all basin stats queries using a time_stats reducer

Doesn't work:

  • uploading a feature asset on-the-fly but only with specific image raster assets
# works
urls, tasks = rabpro.basin_stats.compute(
        [Dataset("projects/soilgrids-isric/soc_mean", "soc_0-5cm_mean", stats=statlist, gee_type="image")], 
    basins_gdf=gdf, validate_dataset_list=False)

# doesn't work, doesn't matter what the resolution is set at
urls, tasks = rabpro.basin_stats.compute(
        [Dataset("JRC/GSW1_3/GlobalSurfaceWater", "occurrence", stats=statlist, gee_type="image")], 
    basins_gdf=gdf, validate_dataset_list=False)

Proposed fix:

Arbitrarily subject image assets to a time reducer which should have no effect other than avoiding the above error

@jsta jsta closed this as completed in 5e121bb Jul 25, 2023
@jsta jsta unpinned this issue Jul 25, 2023
jsta added a commit that referenced this issue Jul 26, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants