Changeset 3336 for inundation/pyvolution/data_manager.py
- Timestamp:
- Jul 14, 2006, 4:47:35 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/data_manager.py
r3312 r3336 725 725 LAT_TITLE = 'LATITUDE' 726 726 LONG_TITLE = 'LONGITUDE' 727 X_TITLE = 'x' 728 Y_TITLE = 'y' 727 729 class Exposure_csv: 728 730 def __init__(self,file_name, latitude_title=LAT_TITLE, 729 longitude_title=LONG_TITLE, refine_polygon=None): 731 longitude_title=LONG_TITLE, is_x_y_locations=False, 732 x_title=X_TITLE, y_title=Y_TITLE, 733 refine_polygon=None): 730 734 """ 731 735 This class is for handling the exposure csv file. … … 777 781 self._geospatial = Geospatial_data(latitudes = lats, 778 782 longitudes = longs) 783 784 if is_x_y_locations: 785 if self._geospatial is not None: 786 pass #fixme throw an error 787 try: 788 xs = self._attribute_dic[x_title] 789 ys = self._attribute_dic[y_title] 790 points = [[float(i),float(j)] for i,j in map(None,xs,ys)] 791 except KeyError: 792 # maybe a warning.. 793 raise TitleValueError, msg 794 else: 795 self._geospatial = Geospatial_data(data_points=points) 779 796 780 797 # create a list of points that are in the refining_polygon
Note: See TracChangeset
for help on using the changeset viewer.