pokeminer icon indicating copy to clipboard operation
pokeminer copied to clipboard

multiple grids

Open traversc opened this issue 8 years ago • 12 comments

I modified the code to allow for multiple grids - important when trying to cover along a diagonal coast for example. You can see an example here: http://imgur.com/a/fxI4f. Should still work with only one grid.

Also, if you could add in pushbullet support directly, that would be sweet (https://github.com/Readdeo/PGOnotify).

traversc avatar Aug 01 '16 02:08 traversc

Added all your code and removed the one you removed and it is working fine with one grid. But how do you add more grids? (sorry complete noob) I am guessing something in the config file but how it should look like I have no idea about :confused:

Zirn avatar Aug 01 '16 14:08 Zirn

In the config files, start, end should be lists and grid should be a list of lists.

traversc avatar Aug 01 '16 19:08 traversc

@traversc You should properly add an example of using this to the config.py.example-file :)

VirtualSatai avatar Aug 01 '16 22:08 VirtualSatai

Here is my current config file (pretty rough outline of some areas, but just to test):

# coding: utf-8
from datetime import datetime

DB_ENGINE = 'sqlite:///db.sqlite'
AREA_NAME = 'Honolulu,HI'
MAP_START = [(21.318211, -157.862556),(21.261988, -157.822416),(21.271774, -157.806483),(21.282394, -157.848757),(21.362364, -157.940002),(21.334177, -157.888227),(21.302450, -157.820387)]
MAP_END = [(21.288576, -157.826917),(21.284586, -157.813896),(21.282170, -157.782839),(21.288562, -157.838657),(21.373704, -157.928201),(21.315106, -157.866114),(21.295714, -157.814181)]
GRID = [(3, 3),(3,1),(1,3),(1,1),(1,1),(2,2),(1,1)]  # row, column
CYCLES_PER_WORKER = 3

LAT_GAIN = 0.001
LON_GAIN = 0.0015

traversc avatar Aug 02 '16 00:08 traversc

Brilliant! I'm currently running multiple workers to accomplish this for a few towns in my area. Would love to see this merged in so I only need to run 1 worker.

andrewbroberg avatar Aug 02 '16 02:08 andrewbroberg

Tested it for my howntown. Works great, awesome feature ! screenshot from 2016-08-03 08-53-07

DeastinY avatar Aug 03 '16 06:08 DeastinY

I got this to work by manually editing all the changes into the latest version EXCEPT I have to remove the lines if odd: row_start_lon -= 0.5 * lon_gain because I get error:

Traceback (most recent call last): File "worker.py", line 347, in <module> spawn_workers(workers, status_bar=args.status_bar) File "worker.py", line 277, in spawn_workers points = utils.get_points_per_worker() File "C:\Users\y\Desktop\pokeminer-master - multi grids\utils.py", line 121, in get_points_per_worker points.extend(get_points_per_worker_single(config.GRID[i], config.MAP_START[i], config.MAP_END[i])) File "C:\Users\y\Desktop\pokeminer-master - multi grids\utils.py", line 98, in get_points_per_worker_single row_start_lon -= 0.5 * lon_gain TypeError: unsupported operand type(s) for -=: 'tuple' and 'float'

This makes it work, but with holes in the middle of every 4 circles, because every other row is supposed to be shifted. (http://i.imgur.com/nqtRm80.png) Is there a way to fix this?

YonderGod avatar Aug 08 '16 04:08 YonderGod

Could you rebase off master?

modrzew avatar Aug 17 '16 17:08 modrzew

Good points, about converting it to a standard format early on. In my own map, I converted to using a hexagonal grid, since it is more space efficient. We can no longer brute force large areas by throwing more accounts at it, so that would be another important change.

traversc avatar Aug 17 '16 19:08 traversc

@traversc this project uses a hex grid for quite a while now....

Aiyubi avatar Aug 17 '16 19:08 Aiyubi

@Aiyubi didn't realize! That's how old my PR is haha.

traversc avatar Aug 17 '16 19:08 traversc

Looking forward to seeing this implemented @traversc. I hope you can get the changes in after a rebase :-)

TristanHM avatar Aug 21 '16 21:08 TristanHM