S2 Cells - what are they?
Essentially the S2 Cell system is a means of mapping (in ever increasing resolution) the surface of the Earth onto a flat surface. The system allows mapping resolutions down to approximately 10cm x 10cm Cells whilst retaining the ability to index each Cell uniquely using a single 64 bit address.
The system was devised back in 2005 by a certain Google Engineer by the name of Eric Veach, using the principles of Hilbert's space filling curve theory. We will not go into any further detail here as there is ample reference material available for your perusal in the internet (we have included a small number of references at the bottom of this page).
Anyone familiar with Ingress and other Niantic location based games will be aware of S2 Cells, but many Keepers will not be familiar with them.
So, why is this important to Peridot? Well, Peridot is a real world, location based game and uses a sub-set of the Pokémon Go POI data for Habitats. The game needs to be aware, on a ,ap, of your location and the Objects on the Map; to that end, the S2 Cell system proves essential and is also used in a number of other Niantic (and others) location based games.
The main S2 Cells used by Peridot are Level 14 and Level 17. The L14 Cells are used for Map Chunks (i.e. the size of the map pieces that are loaded and processed when opening the overground map) whilst the L17 Cells are primarily used for Habitat locations and Feral Dot distribution.
Map open showing data 'Chunk' loaded. You may see this fleetingly when you open the map.
The same map 'Chunk' with the Global S2 L14 Cells overlaid, you can see the alignment of the boundaries here.
The same Map 'Chunk' but now with the addition of the S2 L17 Cells. Each L17 Cell can have one Habitat and one Feral Dot (see how the cleared Blight area aligns almost with the S2 L17 Cell boundaries).
Of course, as a Keeper, the S2 L14 Cells are currently of little concern, the Cells with the main influence on the game being the S2 L17 Cells.
We mentioned above that the S2 L17 Cells can only have one Habitat, there are however, a small number of instances where a Cell may have more than 1, and that is usually down to the original submission point being moved during the Approvals process - and no, you cannot suggest Habitat locations from within Peridot - Wayfarer is the place for that.
On the Peridot Map, the S2 L17 Cells are shown having a 'moving' green outline. Whilst this may be aesthetically pleasing and provide a more 'organic' look to the game, it also causes problems. Due to the visuals not aligning properly with the S2 L17 Cell boundaries, a Keeper may be of the impression that they are clearing Blight from a Habitat Cell when in fact, they may need to be in the adjacent Cell. Not a big deal, but enough to detract from the system of clearing Blight from Habitats!
So, how big is a S2 L17 Cell? The answer is it depends where on the globe you are located (due to the distortion in casting a curved surface onto a flat plane) but in general S2 L17 Cells have bounding sides ranging from 50m to 80m depending on your location. That means you should need to walk no more than 40m to reach the next adjacent S2 L17 Cell.
A selection of useful references: