For a rectangular area of about 10 by 10 km, I have to generate "displacement vectors" with a 1 meter resolution (i.e. a delta-x and delta-y value for every cell of 1 by 1 meter). I will end up with 100 million tuples (x, y, delta_x, delta_y). In a plain text file, this would look like:
x y delta_x delta_y
------ ------ ------- -------
228682 184554 0.429 1.221
228682 184555 0.428 1.222
228682 184556 0.428 1.223
228682 184557 0.427 1.224
228682 184558 0.427 1.225
...
229526 184822 -0.084 0.593
229526 184823 0.185 0.002
229526 184824 0.185 0.001
229526 184825 0.186 -0.001
229526 184826 0.186 -0.002
...
I was wondering if there is an efficient way to store these values as a dataset of type raster/coverage...? The x, y would be the pixel or cell position, and the delta_x and delta_y would be the values. Is HDF5 the way to go? I have no experience using HDF5.
I need to store the values in Python and retrieve them in Python in an efficient way (more efficient then first reading 100 million tuples from a text file, then storing them in a R-Tree index and finally using the index doing intersects).
I am looking for some guidance, tips, best practices, small examples or use cases where this has been done before.