gee-community / geetools

A collection of tools to work with Google Earth Engine Python API
https://geetools.readthedocs.io/en/stable/
MIT License
524 stars 122 forks source link

`maxPixels` in reducing methods for charting #370

Open fitoprincipe opened 2 weeks ago

fitoprincipe commented 2 weeks ago

I'm starting to implement the new method for charting, like ee.ImageCollection.geetools.datesByBands, in a new library that will use pygal as the charting library. The new package will try to mimic the namespaces of GEE JS API. I started by testing datesByBands using the same test as https://github.com/gee-community/geetools/blob/1273b7154bbded6ad9bc15d3eb08a6ebe40283ee/tests/test_ImageCollection.py#L418. However, although it seems to pass in this package, in my test I get

ee.ee_exception.EEException: Image.reduceRegion: Too many pixels in the region. Found 614260390427, but maxPixels allows only 10000000.

which can be overcome by setting a higher maxPixels in the reduction. But unfortunately the method doesn't have the parameter.

Although it might be solved by https://github.com/gee-community/geetools/pull/359, I think it should also be solved in the method.

12rambau commented 2 weeks ago

Do you think it would worth the shot to actually expose all the reducer parameters ?

fitoprincipe commented 2 weeks ago

I think it does. Those params have been there for long and I don't think we should worry about them changing frequently.