Changeset 3745
- Timestamp:
- Oct 11, 2006, 12:23:30 PM (18 years ago)
- Location:
- anuga_core/source/anuga
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/coordinate_transforms/redfearn.py
r3739 r3745 164 164 165 165 166 def convert_from_latlon_to_utm(latitudes=None, 166 def convert_from_latlon_to_utm(points=None, 167 latitudes=None, 167 168 longitudes=None, 168 points=None,169 169 false_easting=None, 170 170 false_northing=None): … … 195 195 utm_points = [] 196 196 if points == None: 197 198 197 assert len(latitudes) == len(longitudes) 199 198 points = map(None, latitudes, longitudes) 199 200 200 for point in points: 201 201 zone, easting, northing = redfearn(float(point[0]), -
anuga_core/source/anuga/coordinate_transforms/test_redfearn.py
r3739 r3745 156 156 lats = [lat_gong, lat_2] 157 157 longs = [lon_gong, lon_2] 158 points, zone = convert_from_latlon_to_utm(lat s,longs)158 points, zone = convert_from_latlon_to_utm(latitudes=lats, longitudes=longs) 159 159 160 160 assert allclose(points[0][0], 308728.009) … … 183 183 184 184 try: 185 points, zone = convert_from_latlon_to_utm(lat s,longs)185 points, zone = convert_from_latlon_to_utm(latitudes=lats, longitudes=longs) 186 186 except ANUGAError: 187 187 pass … … 206 206 longs = [lon_gong, lon_2] 207 207 try: 208 points, zone = convert_from_latlon_to_utm(lat s,longs)208 points, zone = convert_from_latlon_to_utm(latitudes=lats, longitudes=longs) 209 209 except ANUGAError: 210 210 pass -
anuga_core/source/anuga/geospatial_data/geospatial_data.py
r3739 r3745 295 295 data_points, 296 296 points_are_lats_longs): 297 297 298 if geo_reference is not None: 298 299 msg = """A georeference is specified yet latitude and longitude 299 300 are also specified!""" 300 301 raise ValueError, msg 302 301 303 if data_points is not None and not points_are_lats_longs: 302 304 msg = """Data points are specified yet latitude and … … 324 326 raise ValueError, msg 325 327 326 data_points, zone = convert_from_latlon_to_utm(latitudes, longitudes) 328 data_points, zone = convert_from_latlon_to_utm(latitudes=latitudes, 329 longitudes=longitudes) 327 330 328 331 return data_points, Geo_reference(zone=zone)
Note: See TracChangeset
for help on using the changeset viewer.