pocketMMaps (with apologies to Andrew)
I feel kind of bad calling them pocketMMaps
since the name
is only a single, easily overlooked, letter away from the pocketmaps that Andrew and Mikel built for
Mapufacture. By the time it gets beyond being a
0.1 release I may try to find a better moniker
but
since its written in Python and all the Papernet-related software has a tradition of
stupid naming conventions second only to Python itself I
figured: Why not?
pocketMMaps is software for creating PocketMod-style books for a map image too large to fit on a single page. Maps are generated dynamically and then sliced in to (PocketMod) page-sized pieces and re-arranged on multiple sheets of paper so that when printed and folded you get a little book with the map laid out in handy 2-page spreads. Just like the maps you see in the back of travel guides. It may seem as though I have an obsession with destroying the travel book industry but I don't, really. It's just that their maps suck and their books are too big to fit in my back pocket.
It works like this:
height = 11
width = 8.5
margin = .25
dpi = 144
bbox = (45.482882,-73.619899,45.532687,-73.547801)
zoom = 16
out = "montreal_pocketmmap.pdf"
pm = pocketMMap(height, width, margin, dpi)
pm.load_provider('OPEN_STREET_MAP')
pm.draw(bbox, zoom)
pm.save(out)
When you're done, you end up with a PDF file.
pocketMMaps are built on the shoulders of ModestMaps and ws-compose, hence the MM-iness of the naMMe. Sooner rather than eventually I plan to import the code in to the ModestMaps Python trunk but it is still very early days feature-wise. The current short list looks something like this:
- Add support for markers, dots, pinwins, etc. and
reference indexes just like the
original
pocketnet
and ws-modestmaps libraries. - Wrapper code, or libraries, to generate a map and plot points from a source KML, GeoRSS, whatever file just like the orginal mmPDF.php library. Hello, Dopplr tips...
- Better font handling and sizing with an eye towards optionally using PIL so that pycairo is not a dependency.
- Try and reconcile some of the more eggregious uses of
lib_copy_and_pasteback in to either the wscompose or ModestMaps branches. - Tangentially related, writing bloody setup.py files for all the stuff in the ModestMaps Python trunk so you don't have to run everything out of the same folder.
- Support for the Metric system because, you know, the whole world uses it.
- Work out the gotchas and best practices for especially large maps that span many sheets of paper. Experience shows that a PocketMod book with more than five nested sheets of paper kind of sucks.
- ws-pocketmmap.
In the meantime, if you are planning to spend the day wandering around a new and unfamiliar neighbourhood and just want a simple map to print out and take with you, well, now you can.
Ladies and gentlemen, pocketMMap.py 0.1
This blog post is full of links.
#pocketmmapThis blog post is full of links.
#flosmThis blog post is full of links.
#correctionsThis blog post is full of links.
#historybox