source: qesdi/data_processing/COORDDataTable.py @ 5406

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/qesdi/data_processing/COORDDataTable.py@5406
Revision 5406, 326 bytes checked in by dgrant, 11 years ago (diff)

Classes for reading basic data plus precipetation implementation

Line 
1
2class COORDDataTable:
3    """Class to store a lookup tree (dict of dicts) of data by latlon"""
4   
5    def __init__(self):
6        self._lookupTable={}
7       
8    def insert(self,dataPt, lat, lon):
9        self._lookupTable.setdefault(lat,dict())[lon]=dataPt
10       
11    def lookup(self, lat, lon):
12        return self._lookupTable[lat][lon]
Note: See TracBrowser for help on using the repository browser.