cuspaceflight/ruaumoko — pull request #12 by rjw57 (2014-10-17 14:00:41+00:00)
Title: Download tool rework

I'm opening this PR mostly for discussion and sanity checking. I don't propose merging unless ACKed by someone more familiar with the predictor set up. (Such as @danielrichman.)

Give the download tool a little love and, in the process, port to Python 2. This is part of an effort to get a testing-friendly flavour of ruaumoko. There is currently no change to the (default) behaviour or the output. This has been manually tested with a 2.7 and 3.3.5 virtualenv.

There's a little bit of magic customisation going on here because, with an eye to testing, I'd like to be able to specify a test server in Travis to download a small amount of data rather than the full 7GiB on each commit :smile:.

This PR also lands the ability to customise which chunks are downloaded. This feature, for the moment, would break the server if used. It has been added with an eye to testing.

Aside: I may suggest a move to the [GDAL](http://www.gdal.org/) library to access the DEM TIFFs which has the advantage of being able to read the pixel-to-longitude/latitude directly from the TIFFs while preserving the use of mmap to avoid reading 7GiB into RAM. However, that's a discussion to have on another day.