The gridTools Perl package is a collection of tools that can be used for generating hexagonal grids and making TOAW map "embryos".
The map generating process can be divided into three steps:
(1) Grid generation, where long/lat coordinates for a hexagonal grid is produced for the map region of your choice.
(2) Hex numbering, where TOAW-style (x,y)-coordinates are assigned to each hex.
(3) Map generation, in which land hexes are determined against a GIS database, and a starting point for a TOAW map in XML-format is constructed.
Details of each of these steps are described in subsequent posts. I have tried to be as objective as possible, describing both merits and draw-backs of the method. Posts will be edited to reflect new findings and clarify things.
If you find this could be useful for your upcoming scenario - please let me know what you would like to have. If time allows, I will produce a sample for you to use or discard. For those of you who would like to try it out for yourself, the rest of this post outlines what you need.
Obtaining gridTools
Acknowledgements:
The grid generation utilizes DGGRID, http://www.sou.edu/cs/sahr/dgg/, while some other algorithms use several tools of GMT, http://gmt.soest.hawaii.edu/, which is hereby acknowledged.
The method for further subdivision of a grid came about in a discussion with Bob Cross and Colin Wright (see post 10 - 23 below).
Disclaimer:
The package is provided freely "as is" - you use it at your own peril!
Download:
The gridTools zip-archive attached to this post contains the following files:
- README.txt : a text file basically containing this and associated posts.
- gridTools.pm : the gridTools Perl package
- generateGrid.pl : a Perl script that uses gridTools to generate a grid
- hexNumbering.pl : a Perl script that uses gridTools to assign TOAW (x,y) numbers to each hex in a grid generated by gridTools
- determinePlaces.pl : a Perl script that uses gridTools to assign TOAW (x,y) numbers to all places listed in a separate file. Distances between these places are also calculated
- calcDistances.pl : a Perl script that performs distance calculations
- toawMap.pl : a Perl script that uses gridTools to construct a TOAW map in XML-format from a grid numbered by gridTools
- input.pl : sample input file for gridTools with comments (Sicily @ 15 km/hex)
- test-places.inp : sample file with some placenames to be added to the map.
Dependencies:
In order to use the package, you need some additional software. They are all downloadable for free (links valid as of 2008-07-13):
- Obviously, you need to have a Perl interpreter installed. I use ActivePerl 5.10.0, which is available here: http://www.activestate.com/Products/activeperl/index.mhtml
- The grid generation uses DGGRID, which you can get here: http://www.sou.edu/cs/sahr/dgg/dggrid/dggrid.html (you want the MSDOS executable)
- The GMT generic mapping tools are available from http://gmt.soest.hawaii.edu/. Select "Download", and "GMT Windows", then download the required, as well as the two optional files.
- Finally, if you want to view PostScript grid plots that are optionally generated as a help for map planning, you will also need a PostScript viewer. GSView (built on GhostScript) is one choice, capable of exporting PostScript to PDF-format. Instructions on how to get GSView and GhostScript are available here: http://pages.cs.wisc.edu/~ghost/gsview/index.htm






