I have an application which reads in gridded coordinate data with values (i.e. lat, lon, value) and then plots this data on a map. The map that is drawn uses a lambert conformal conic projection and therefore all the coordinate data has to be converted from lat/lon to easting/northing. This all works great, however there is a noticeable performance issue when reading in several data files. Since all the data files contain the same set of points (although not necessarily in the same order) I'm thinking some sort of lookup table would be useful for the coordinate conversions. However I've never used lookup tables before and am having some trouble figuring out the design.
In a nutshell - any suggestions on the fastest way to take a lat/lon coordinate pair (float values) and look up the corresponding E/N pair (float values) assuming there is a 1:1 relationship between the coordinate pairs, no missing values, etc?
Since the lat/lon are float values I can't use them as array indices (ex: lookup_array[lat][lon]) obviously so this is really where I'm getting the most tripped up.
Note: this solution can be in either C or C++, whichever has the optimal solution.