Rasterio 1.0.23

I've been busy with a new product at work the past few weeks, writing Javascript and HTML, and hiring new teammates, but found some space this week to knock out some Rasterio bugs and release version 1.0.23. Here's the relevant section of the change log: https://github.com/mapbox/rasterio/blob/master/CHANGES.txt#L4-L20.

I added some control over rio-calc's memory usage yesterday and had fun doing it. In 1.0.22, rio-calc read all your sources into memory, preventing calculations on very large datasets. There are a number of ways to chunk the calculations and output of the results. GDAL's gdal_calc.py script divides the job into chunks that match the storage of the input files. I rewrote rio-calc to chunk the work more like GDAL's warper does: you specify a maximum amount of memory to be used by the program and rio-calc divides the job into chunks that need approximately less than this amount. You, the user, are free to trade memory for speed.

The rio-calc command uses Lisp-like expressions. Some people like them, some people don't. Evaluation of the expressions is done with snuggs. The expression evaluator in gdal_calc.py uses Python's eval(). Snuggs does not use eval() and uses a whitelist of names and keywords. It is much safer. For example, you can't trick snuggs into importing modules that give filesystem access. You could use snuggs on your server to evaluate expressions written by untrusted people on the internet. You would be asking for trouble if you did this with gdal_calc.py. This is not to say that Snuggs is perfect and has no bugs. We found some this week and fixed them. If you're a rio-calc user, make sure you upgrade snuggs to 1.4.6 to get the latest and greatest version.

Thank you for using Rasterio and thank you for the ever-excellent bug reports. Clear writing and examples of failing code make it much easier for a busy programmer to switch context and dispatch bugs efficiently.

Training week twenty-four and Quad Rock recap

This final week's numbers:

  • 15 hours, 8 minutes running and hiking (2nd of 24)
  • 62.8 miles (6th)
  • 11,270 feet D+ (2nd)

Add to that one Quad Rock 50 finish in 13:13:50. My first ultramarathon.

https://live.staticflickr.com/65535/47785140532_7716eaee3c_b.jpg

Ruth says I looked fresher at the finish than I did in 2015 when I finished my first road marathon. It's partly because this race was more fun and partly because of my training. I'm sore today, but not wrecked.

David Bitner ran the first half of this with me and is a 25 mile finisher. He's building toward the Superior 100 in September and this was an early season training run. All the photos below are from his phone.

https://live.staticflickr.com/65535/47782790042_2d6e0c9ba5_b.jpg

Heading up South Ridge Trail, the second of six climbs

https://live.staticflickr.com/65535/47045334154_6d88aacb1e_b.jpg

On Westridge Trail, the top of the third climb

https://live.staticflickr.com/65535/47045348654_60222d0d68_b.jpg

At the finish, just before I went up for another 25 miles

I had so much fun hanging out with Bitner before, during, and after the race. I'm looking forward to the next chance.

Despite the snow that fell 2 days before, the trails were in great shape. The sky was blue for the first half, which made staying in a good mood easy; and cloudy in the second half, so I was never at risk of overheating. For once, it seemed like all factors were in my favor.

Not that there wasn't adversity. At the bottom of the fifth climb I had reached my longest single-day distance ever and I was going into uncharted territory. I had strained my left calf, high up behind my knee, and it hindered me for the rest of the run. My body had reached its VFuel and almond butter & honey sandwich consumption limit. I compensated by hiking more slowly uphill and letting go of the brakes on the downhills, flipping my tactics. I switched to boiled potatoes, Haribo Sour Cubes, and gingerale. I was beginning to suffer a little chaffing as I approached the 40-mile aid station, but had had the foresight to stash my favorite shorts from last year, semi-retired, in a drop bag there. Those old shorts saved my butt.

Too make a long story short: I had a great adventure and am super pleased with myself for finishing. Congratulations to all you other finishers. You who didn't finish have my sympathy. Big thanks to Nick, Brad, Gnar Runners, and all the volunteers who planned and operated a fine event!