pokeminer
pokeminer copied to clipboard
multiple grids
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).
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:
In the config files, start, end should be lists and grid should be a list of lists.
@traversc You should properly add an example of using this to the config.py.example
-file :)
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
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.
Tested it for my howntown. Works great, awesome feature !
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?
Could you rebase off master?
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 this project uses a hex grid for quite a while now....
@Aiyubi didn't realize! That's how old my PR is haha.
Looking forward to seeing this implemented @traversc. I hope you can get the changes in after a rebase :-)