Storing gridded data with constant spatial and temporal resolution
I have data that is currently in flat binary files that I want to now store in MySQL. The data is on a regular grid, and this grid is constant (let's say 1 degree lat/lon grid). It's basically temperature interpolated to this evenly spaced grid. I have a grid for every day over several years, so there's a constant space and time dimension with this data. I want to be able to select points within a certain region, and within a certain time period.
Now, I could just make a new row for every single point/time, with columns lat, lon, time, temperature, but since my grid is constant, there's alot of redundancy there, no? I do have space constraints, since there are a huge amount of files, and I assume the database will take up more space than a flat binary file, since the file does not need to store the lat, lon, and time of every point, just the temperature.
So what's the best way to store this data? Do I just make a lookup table with an ID corresponding to a gridpoint (i,j), and have the data table have columns ID, temperature, then make a complicated SELECT query to get at points with a certain i,j or lat/lon? What about the time dimension?
Basically, has anyone done any work with storing gridded spatial data? I see lot's of info on Geospatial data, but it's usually cities, stations, etc., not a regular grid that doesn't change...