Skip to content

Repository files navigation

PMSFnestScript

Script to analyze scanned Data from Scanner Projects (like RDM or MAD) in combination with Data from OSM (Open Street Map)

USAGE

Edit and rename the default.ini.example to default.ini

If you want to use your own config, start it with the config argument:

python analyze_nests.py -c myconfig.ini

You only need to add attributes to your custom config that needs to be changed.
It will use the default attributes from default.ini if an attribute is missing in your config.

If you have different scan areas/cities you can edit the default.ini and use the example city configs(00_city_1.ini, ...) in the custom_configs folder.
After this just start the bash script:
./nest_them_all.sh
The script will use each config in the custom_configs folder, one after the other.
(If you use the given numeration in the filenames 00_city_foo.ini, 01_city_bar.ini, it will keep the sequence of the files.)

Config File Explanation

[Nest Config]

Variable nameDescriptionTypeDefault Value
TIMESPAN_SINCE_CHANGETimespan which should be used to analyzeInteger16
MIN_POKEMON_NEST_COUNTMinimum amount a poke must be spawned in nest areaInteger10
MIN_SPAWNPOINT_NEST_COUNTMinimum amount a spawnpoint must be in nest areaInteger10
DELETE_OLD_NESTSDelete old Nests in DBBooleanTrue
EVENT_POKEMONFilter out event pokemon from nest analyzeList[]
POKESTOP_POKEMONUse also Pokemon from pokestops (ONLY USE THIS WITH RDM!)BooleanTrue
ANALYZE_MULTIPOLYGONSAnalyze only Multipolygons
[only needed if not all Nests are scanned]
(Use an extra config for each park, to not get limited by API!)
BooleanFalse

[Area]

Variable nameDescriptionTypeDefault Value
NAMEName of the Area, this will be used for OSM filename`StringMy_Area
POINT1_LATPoint 1 - LATITUDE of LOWER LEFT POINT of the Reactangle AreaDouble0.236535
POINT1_LONPoint 1 - LONGITUDE of LOWER LEFT POINT of the Reactangle AreaDouble0.932723
POINT2_LATPoint 2 - LATITUDE of UPPER RIGHT POINT of the Reactangle AreaDouble0.236535
POINT2_LONPoint 2 - LONGITUDE of UPPER RIGHT POINT of the Reactangle AreaDouble0.932723

[DB Read]

Variable nameDescriptionTypeDefault Value
HOSTAdresse of your DatabaseString127.0.0.1
NAMEName of the DatabaseStringrdmdb
USERUsername for DatabaseStringrdmuser
PASSWORDPassword of Username for DatabaseStringmy_password
PORTPort of the DatabaseInteger3307
CHARSETCharset of the DatabaseStringutf8mb4
TABLE_POKEMONName of the Pokemon TableStringpokemon
TABLE_POKEMON_SPAWNIDName of the Spawn id Column in pokemon tableStringspawn_id
TABLE_POKEMON_TIMESTAMPName of the Timestamp Column in pokemon tableStringfirst_seen_timestamp
TABLE_POKESTOPName of the Pokestop TableStringpokestop
TABLE_SPAWNPOINTName of the Spawnpoint TableStringspawnpoint
TABLE_SPAWNPOINT_IDName of the Spawnpoint id Column in spawnpoint tableStringid
TABLE_SPAWNPOINT_LATName of the Spawnpoint Latitude Column in spawnpoint tableStringlat
TABLE_SPAWNPOINT_LONName of the Spawnpoint Longitude Column in spawnpoint tableStringlon
USE_UNIX_TIMESTAMPUse Unix Timestamp in SQL Queries
(only needed with MAD)
BooleanFalse

[DB Write]

Variable nameDescriptionTypeDefault Value
HOSTAdresse of your DatabaseString127.0.0.1
NAMEName of the DatabaseStringrdmdb
USERUsername for DatabaseStringrdmuser
PASSWORDPassword of Username for DatabaseStringmy_password
PORTPort of the DatabaseInteger3307
CHARSETCharset of the DatabaseStringutf8mb4
TABLE_NESTSName of the Nest TableStringnests

[Geojson]

Variable nameDescriptionTypeDefault Value
SAVE_PATHFilepath on which the geojson file should be savedString/var/www/nest.json
GEOJSON_EXTENDFalse => Overwrite existend file (if there is one)
True => Extend the geojson file with the new analyzed data
(True is normally used for main city and then on the other cities it is used False, so that the one file have data from all cities)
BooleanFalse
DEFAULT_PARK_NAMEDefault Name that should be used for unknown park namesStringUnknown Parkname
STROKEColor of the Nest-Area-Line as HexString#352BFF
STROKE-WIDTHWidth of the Nest-Area-LineInt/Double2
STROKE-OPACITYOpacity of the Nest-Area-LineInt/Double1
FILLColor of the Inner-Nest-Area as HexString#0651FF
FILL-OPACITYOpacity of the Inner-Nest-AreaInt/Double0.5

[Discord]

Variable nameDescriptionTypeDefault Value
ENABLEEnable or Disable Discord WebhookBooleanFalse
WEBHOOKList of links of the Webhooks that should be usedString["https://discordapp.com/api/webhooks/xxxxx/xxxxxx"]
USERNAMEUsername the Bot uses for sending dataStringNest-Bot
LANGUAGELanguage for the Pokemon named (en, de, fr, jp, cz )Stringen
SORT_BYFor which value the list should be sorted by:
name -> Park Name
pokemon_id -> Pokedex Nr
pokemon_name -> Pokemon Name (Language specific)
pokemon_avg -> Average Sighting
Stringname
SORT_REVERSEFor reversing the order: TrueFalseBoolean
IGNORE_UNNAMEDIgnore Parks without NamesBooleanTrue
TITLETitle which will be written before the nest list
Available Blocks: {park_name}
String**This is the Nest report for {area_name}**
TEXTText which will be used to send to Discord
Available Blocks: {park_name}, {poke_name_g}, {poke_shiny},{poke_type},{poke_type_emoji},{poke_avg}, {g_maps}, {time}
String**{park_name_g}**: {poke_name} {poke_shiny} ({poke_type_emoji}) => {poke_avg} per hour
LOCALE_FILELocale file which should be used (for example custom emojis)Stringlocale.json

[Other]

Variable nameDescriptionTypeDefault Value
ENCODINGEncoding user in the scriptStringutf-8
VERBOSEPrint out additional informationBooleanFalse
OSM_DATEDate which should be used the data from OSM
Niantic only update/sync their database 2-3 times a year, so changing this date can lead to false data
the default value is the current date niantic uses
String2019-02-24T00:00:00Z

About

Script to analyze scanned Data from Scanner Projects (like RDM or MAD) in combination with Data from OSM (Open Street Map)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages