google / google/s2geometry

S2RegionIterator

Open
#125 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.7k
Forks
357
Avg merge
11h 4m
Merged PRs (30d)
1

Description

I have a need to iterate over every cell within a region using `GetInteriorCovering` and `GetCovering`. I don't need the minimal cell set.

Using the existing `GetInteriorCovering` and `GetCovering` 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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.