xiankai / pokemongo-tools

MIT License
4 stars 1 forks source link

Tools for generating compiled datasets for EX-raid map

Demo: https://xiankai.github.io/sg-pokemongo-ex-raid-map/
Linked Repo: https://github.com/xiankai/sg-pokemongo-ex-raid-map

Installation

This assumes basic knowledge of node, npm or yarn.

  1. yarn add pokemongo-tools
  2. yarn to install dependencies.
    • You must be on node 6 to compile @mapbox/s2-node on OSX, but you should switch to node 8+ for better performance afterwards.
    • For reference, it takes 55s to process 1.8k gyms on v6.12.2 yet only 17s on v9.3.0

overpass.c

OSM query template for https://overpass-turbo.eu/, copied from this reddit thread

Also modified to only show valid park tags.

I originally had one myself but it is outdated with the current research thus far and thus invalid.

It has the c extension for formatting as the syntax is derived from C.

After running the query you should have the option to Export as a GeoJSON file. There is also the option to backdate the query to what the OSM map was at a certain date.

all.js

This will generate the all.geojson required.

Input

The following CSV files are required to be in the same folder.

Some general notes about gym data and CSV files:

gyms.csv

parks.csv

exraids.csv

s2_L*.geojson (generated from s2.js)

Usage

The above file names are assumed to be in the same directory.

node all.js

sheets.js