thinkingmachines / geowrangler

🌏 A python package for wrangling geospatial datasets
https://geowrangler.thinkingmachin.es/
MIT License
47 stars 14 forks source link

Cache Hashing Error -- only takes into account aoi.total_bounds #219

Open tm-jc-nacpil opened 8 months ago

tm-jc-nacpil commented 8 months ago

Filing an issue to raise a possible bug with the hash caching. Currently the cache hash is generated from the input aoi's total bounds

# Generate hash from aoi, type_, and year, which will act as a hash key for the cache
    data_key = compute_datakey(aoi.total_bounds, type_, year, return_geometry)

It was raised that if we have two AOIs with different data but the same total_bounds, this would result in the function wrongly pulling from an existing cache for aoi_1 instead of recalculating and caching the result for aoi_2