Open r-barnes opened 4 years ago
It sounds like you're setting min_level = max_level
or otherwise forcing a lot of cells to be generated, which is not the way it's intended to be used. What's the higher level problem you're trying to solve?
Ultimately, I want to the set of uint64 cell ranges at a given level which cover a polygon, but at high resolution.
To get that, I'm using max_level=24
or greater over very large areas and then merging sequential ranges.
But why are you trying to do this? S2RegionCoverer
is designed so you work with a small number of cells at different levels.
I have a need to iterate over every cell within a region using
GetInteriorCovering
andGetCovering
. I don't need the minimal cell set.Using the existing
GetInteriorCovering
andGetCovering
functions doesn't work because they calculate and store all of the cells. In my use case, this requires gigabytes of memory and leads to a crash. As an alternative, I've altered these functions to take a functor/lambda as an argument which performs the needed processing. The result is fast and has limited memory requirements.I wonder if it is worth trying to upstream this?