Imported from geotrellis issues. See discussion in: https://groups.google.com/forum/#!topic/geotrellis-user/UYg3OA5cJf8