Over the last month, as part of my own journey to finally get an EX raid pass, I began researching the eligibility criteria for EX raids. I reported my findings via reddit along the way, (Original posts can be found here, here and here).  but wanted to have an opportunity to pull together my findings into one (relatively) concise document.

As part of my study, I compiled a large list of over 1000 non-sponsored EX raid locations from different countries around the world, including Australia, Canada, France, Germany, Singapore, Hong Kong, the United Kingdom and the United States. I then compared the locations of each of these gyms to data exported from OpenStreetMap to discover what selection criteria Niantic must be using to select which gyms can host EX raids.

In this first article, I will be outlining three key findings which I made related to whether or not a gym can host EX raids. In my second article, I will explain how this information can be used to generate custom maps to visualize eligible EX raid gyms.

Finding #1: Niantic’s definition of ‘parks’ relates to tags on OpenStreetMap.

OpenStreetMap is the Wikipedia version of a map. It is map formed by the contributions of editors around the world. In addition to mapping roads, OpenStreetMap allows users to map a variety of features such as parks, gardens and golf courses. Niantic uses these features from OpenStreetMap as the basis for nests.

On 21st November 2017, Niantic stated as part of their Developer Insight that “EX Raid Battles will take place most commonly at Gyms found in parks and sponsored locations.” Niantic’s definition for parks here matches their definition for nests. In particular, my analysis of EX raid locations has found that all non-sponsored EX raids since November 2017 have been associated with one of more of the following tags on OpenStreetMap:

  • leisure=park
  • leisure=recreation_ground
  • leisure=pitch
  • leisure=garden
  • leisure=golf_course
  • leisure=playground
  • landuse=recreation_ground
  • landuse=meadow
  • landuse=grass
  • landuse=greenfield
  • landuse=farmyard
  • landuse=vineyard
  • landuse=farmland
  • landuse=orchard
  • natural=scrub
  • natural=heath
  • natural=grassland

There are two additional OSM tags which are associated with nests which are expected to produce EX-raids, but have not yet been confirmed:

  • natural=moor
  • natural=plateau

Every EX raid location in my analysis corresponded to an appropriately tagged way on OSM. None of the EX raid locations are tagged as multi-polygon relations. This is a key difference to nests, which correspond to both ways and relations. As a result of this difference, parks marked as relations on OSM may visually look like parks on the editor and may have nests, but be unable to host EX raids.

It is possible to visualize the EX raid-related ways in your local area using the following overpass-turbo query: http://overpass-turbo.eu/s/vs3. Simply navigate the map to your area and click ‘Run’. Areas with confirmed EX raid tags will be shown in blue, with unconfirmed areas shown in grey.

Image: Overpass-turbo query of New York showing non-sponsored EX raid eligible areas

Finding #2: Niantic is using OSM data from 2016 to determine whether gyms are in ‘parks’

So far we have been able to determine that EX raids are using OSM data from somewhere between July 15, 2016 and August 31, 2016.

For each EX raid location, we can look at the dates in which parks were created. A number of EX raids occurred in locations that were not created until July 2016:

Gym name

Date of OSM creation

OSM link

Medford Statue of Liberty

2016-07-06

https://www.openstreetmap.org/way/429478447/history

上帝古廟

2016-07-09

http://www.openstreetmap.org/way/430054654/history

九龍城立方體地標

2016-07-09

http://www.openstreetmap.org/way/430055469/history

Архитектурное Нечто

2016-07-15

https://www.openstreetmap.org/way/431274945/history

Determining the latest possible date of the OSM data requires an EX raid to be located in a park which has since been removed or modified. This is not frequent, however, there are a few gyms which do fit these criteria.

Gym name

Date of OSM modification / Removal

OSM link

Towers Baptist Church

2017-01-06

http://www.openstreetmap.org/way/24589645/history

(Golf course gym)

2016-11-17

(Location withheld at the request of submitter)

Jin Fu Gong Temple

2016-08-31

http://www.openstreetmap.org/way/96007421/history

南洋公园

2016-08-31

http://www.openstreetmap.org/way/96007421/history

This means the data used for determining whether gyms are in parks was taken from a snapshot of OpenStreetMap from somewhere between 15 July 2016 and 31 August 2016. At this stage, we are unable to provide a date any more specific, but given that park additions seem to be more frequent than park removals, it is likely that the OSM data is from earlier in this time period as opposed to later.

It is important to note that the date of the EX raid park data is different to the data used to determine which parks are in nests. Nests use data from January 22, 2017, so it is possible to have an area that is a nest but cannot host EX raids, and vice versa. Additionally, the visual data in the game was formerly using OSM data from August 2017, and was recently updated to use OSM data from December 2017. Altogether the fact that EX raid data, nest data, and visual map data is unsynchronised makes it difficult for players to determine whether a gym is inside a park for EX raid purposes.

Finding #3: Niantic uses s2 cells to determine whether a gym is ‘inside’ a park

S2 cells are a way of mapping the world with cells of various sizes. The cells range from level 0 (covering 1/6th of the Earth’s surface) down to level 30 (smaller than the size of your fingernail). Different level s2 cells are used in Pokemon Go for different purposes, including setting the capture location of wild Pokemon (level 10 cells), determining which Pokestops will turn into gyms (level 14 cells),  determining which Ingress Portals will become Pokestops (level 17 cells) and be determining the location of individual spawn points (level 20 cells). These cells can be visualized using Sidewalk Labs region coverer.

Every spawn point in the game lays at the center of a level 20 cell. In order to determine whether a spawn point should spawn nest Pokemon or not, the game checks whether the center of the level 20 cell falls within a park (or other nesting tag) from the January 2017 OSM data.

Image: Level 20 s2 cells overlayed on the in-game map. Credit: /u/MzRed (Original Image  Post)

The game uses a similar mechanism to determine whether a gym is inside a park, albeit using OSM data from a different time period. For each gym, the game finds the level 20 cell containing the gym and then checks whether the center of the level 20 cell is inside the park. For gyms that are well inside their respective parks this is fine, however, it can create some interesting situations for gyms which are located close to the borders of their parks.

The following image shows four potential situations with gyms near park borders:

Gym A and Gym B are both eligible for EX raids because each gym is located in a cell whose center lays within the park polygon. This is true even though the actual physical location of Gym B is outside the park polygon.

Gym C and Gym D are both ineligible for EX raids because the center of their level 20 cells lay outside the park polygon. This is true even though Gym D itself is located inside the park polygon and would appear inside the dark green area inside the game.

This mechanism of using level 20 cells explains the entire dataset of non-sponsored EX raid locations that were analyzed as part of my study. From the 1009 gyms, 973 met conditions similar to Gym A in the image above, and 36 met conditions similar to Gym B. There was not a single instance of an EX raid gym in the dataset which met the conditions of either Gym C or Gym D.

Image: Lion & Wolf Girls Mural in New York is an example of gym similar to Gym B. It held an EX raid on November 18, 2017 despite being located 1 meter outside the border of the park. The center of the level 20 cell containing the gym, marked at the center of the red X, is inside the borders of the park.

 

In Part 2, which we will post in a few days, I will explain how this information can be used along with various tools to create maps of EX raid eligible gyms.