Satellite Map

What is this?

It's a world map generator written in Python. It generates a random world map represented in a hexagon grid. The parameters for the generator allow for any kind of planet surface to be generated. It also can segment the surface into randomly sized globs called territories.


I'm using this as a board for a browser-based game I am working on. It can be used for anything from DnD campaigns to open-source games or even just for fun.


This project requires the following:

It's recommended to use virtualenv and virtualenvwrapper to keep the dependencies of this project separate from those that are installed globally on your system. With virtualenvwrapper, you can install this project with the following:

mkvirtualenv hexgen -p python3
pip install -r requirements.txt

Tip: Installing Pillow through pip requires the python header files. You can install those on Debian/Ubuntu with sudo apt-get install python3-dev.

To test your installation, run the unit tests:


If everything is working, it should report back "OK".

How to use

Export types

The primary export of Hexgen is a data structure that represents the world map. It can also export a bunch of png files that show various features on the map.

One interesting thing it can do is take all the data about a hexagon and determine its true color. As exported as an image, the entire grid taken as a whole can be thought of as a satellite image.

Hexagon types:

Hexagon properties