The package enables user to request a FOAM signal visualization by providing its ID. Visualization includes:
- mapbox map showing area around the signal;
- beacon showing location of the signal
- and a dome representing range of the signal.
Dome size, map zoom and beacon size depend on signal's radius. FOAM signals radius can range from 1 to 25 km.
Signals radii: 1km --> 5km --> 25km
With Mapbox-maps zoom depends on latitude, click here for an explanation.
- Web3 call to FOAM SignalToken contract
- API call for geohash
- API call for normal map without roads and labels
- API call for map with roads only
- API call for map with labels only
This enables putting a layer in between ground, labels and roads.
- Semi-circle (0° --> 180°)
- Semi-ellipse (0° --> -180°)
- Ellipse outline arcs fading with distance
Please log bugs and feature requests to issues. Develop and add your own features by creating a pull request.
$ virtualenv env
$ source env/bin/activate
$ pip install -r requirements.txt
MAPBOX_TOKEN = xxxxx
WEB3_INFURA_PROJECT_ID = xxxxx
Create Mapbox token here. Create Infura API key here.
Include --save
to save the visualization and --show
to display it with the default image viewer.
$ python main.py <signal_id> [--show] [--save [<path>]]
Try it out with signal #223:
$ python main.py 223 --show
User can provide its own parameters instead of calling a signal.
In visualizer.py
there is a function visual_from_data
which takes coordinates and radius as parameters.
Look at run_examples.py
for some examples.
Polar explorers note! Mapbox only allows latitude <= 85°N and >= 85°S.
Map images © Mapbox © OpenStreetMap
Beacon visuals © Macrovector
You can contact me via mail on [email protected]