Changeset 2276 for inundation/coordinate_transforms/geo_reference.py
- Timestamp:
- Jan 25, 2006, 12:11:06 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/coordinate_transforms/geo_reference.py
r2262 r2276 117 117 If the points do not have a geo ref, assume 'absolute' values 118 118 """ 119 # currently untested120 if points_geo_ref is self:121 return points122 119 123 120 is_list = False … … 125 122 is_list = True 126 123 if len(points)>0 and type(points[0]) not in [types.ListType,types.TupleType]: 127 #a single po nt is being passed. make it a list of lists124 #a single point is being passed. make it a list of lists 128 125 points = [points] 129 126 elif type(points) == ArrayType: 130 127 if len(points.shape) == 1: 131 128 points = [points] 132 129 130 # currently untested 131 # Always returns a list of lists 132 if points_geo_ref is self: 133 return points 133 134 134 135 #convert into array … … 165 166 # convert into array 166 167 points = array(points).astype(Float) 167 168 168 # add primary geo ref from points 169 169 points[:,0] += self.xllcorner … … 171 171 if is_list: 172 172 points = points.tolist() 173 173 174 174 return points 175 175
Note: See TracChangeset
for help on using the changeset viewer.