[gdal] index() now throws out_of_range

and replace ceil by round