S2 Cells & Ingress

This page describes how pokestops and gyms are created and what we know about the algorithms that rule them.

Ingress

Ingress is another Augmented Reality game by the same company that created Pokemon GO. The two games share most connections to real world. They are called Portals in Ingress and Pokestops or Gyms in Pokemon GO.

Ingress players that reached level 10 can submit new portals. Ingress players that reached level 12 can review and approve or reject these submissions.

Most new portals are converted to Pokemon GO and become either pokestops or gyms. The algorithms that decide which portals are converted to Pokemon GO and which become Gyms are based on a mathematical concept called S2 cells.

Ingress resources

S2 Cells

S2 cells is a way to split a sphere into squarish sections of approximately the same size. It was invented by Google to make some algorithms in Google Maps run faster.

S2 cells come in different sizes called "levels". S2 cell of level N contains four S2 cells of level N+1.

Here is how Level S2 cells look in Maynard. Blue cells are level 14, red cells are level 17.

This Reddit thread describes what is known about S2 cells in Pokemon GO. Here is a summary.

  1. Only one PokeStop or one Gym in a level 17 cell. There can be multiple Ingress portal in a L17 cell, but only one Point of Interest in Pokemon GO.
  2. Gyms are decided in level 14 cells. Each level 14 cell contains 64 level 17 cells, so up to 64 PoI in Pokemon GO. A number of these PoIs become gyms.
    • 1 PoI is always a pokestop
    • 2-5 PoIs - 1 gym
    • 6-19 - 2 gyms
    • 20-34 - 3 gyms
  3. EX raids are controlled by level 13 cells. Only one gym in each level 13 cell can host an EX raid in any given week.
  4. Level 20 cells are used to decide whether or not a gym that is on the boundary of a park is eligible for EX raids.

S2 cell resources

PogoMap.info allows you to turn on display of S2 cells of levels used in Pokemon GO.

s2.sidewalklabls.com lets you highlight S2 cells of any level. This site also shows the unique codes of the cells displayed.

OpenstreEtmap and parks

Pokemon GO uses OpenStreetMap to decide nests and EX gyms. OpenStreetMap allows anyone to add features and tags to the map.

Niantic does not use the "live" map, instead it takes a snapshot of the map at a certain date. If you want to add a feature that attracts Pokemon, be prepared to wait till Niantic updates their maps (and please don't add features that don't exist IRL).

Note that Niantic uses different snapshots for nests and for EX raids.

This website can conveniently color EX eligible areas - overpass-turbo.eu/s/vq5. Unfortunately it doesn't show gyms or S2 cells. The query in the left frame of the overpass-turbo site shows OSM tags that are believed to be eligible for EX raids.

//Tags that are confirmed to classify gyms as 'parks' for EX Raids

way[leisure=park];

way[landuse=recreation_ground];

way[leisure=recreation_ground];

way[leisure=pitch];

way[leisure=garden];

way[leisure=golf_course];

way[leisure=playground];

way[landuse=meadow];

way[landuse=grass];

way[landuse=greenfield];

way[natural=scrub];

way[natural=heath];

way[natural=grassland];

way[landuse=farmyard];

way[landuse=vineyard];

way[landuse=farmland];

way[landuse=orchard];


//Tags that have been linked to nests but not yet proven to work for EX Raids

way[natural=plateau];

way[natural=moor];