Changeset 3745


Ignore:
Timestamp:
Oct 11, 2006, 12:23:30 PM (18 years ago)
Author:
ole
Message:

A few minor changes to convert_from_latlon_to_UTM to make run_karratha work

Location:
anuga_core/source/anuga
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/coordinate_transforms/redfearn.py

    r3739 r3745  
    164164
    165165
    166 def convert_from_latlon_to_utm(latitudes=None,
     166def convert_from_latlon_to_utm(points=None,
     167                               latitudes=None,
    167168                               longitudes=None,
    168                                points=None,
    169169                               false_easting=None,
    170170                               false_northing=None):
     
    195195    utm_points = []
    196196    if points == None:
    197        
    198197        assert len(latitudes) == len(longitudes)
    199198        points =  map(None, latitudes, longitudes)
     199       
    200200    for point in points:
    201201        zone, easting, northing = redfearn(float(point[0]),
  • anuga_core/source/anuga/coordinate_transforms/test_redfearn.py

    r3739 r3745  
    156156        lats = [lat_gong, lat_2]
    157157        longs = [lon_gong, lon_2]
    158         points, zone = convert_from_latlon_to_utm(lats, longs)
     158        points, zone = convert_from_latlon_to_utm(latitudes=lats, longitudes=longs)
    159159
    160160        assert allclose(points[0][0], 308728.009)
     
    183183       
    184184        try:
    185             points, zone = convert_from_latlon_to_utm(lats, longs)
     185            points, zone = convert_from_latlon_to_utm(latitudes=lats, longitudes=longs)
    186186        except ANUGAError:
    187187            pass
     
    206206        longs = [lon_gong, lon_2]
    207207        try:
    208             points, zone  = convert_from_latlon_to_utm(lats, longs)
     208            points, zone  = convert_from_latlon_to_utm(latitudes=lats, longitudes=longs)
    209209        except ANUGAError:
    210210            pass
  • anuga_core/source/anuga/geospatial_data/geospatial_data.py

    r3739 r3745  
    295295                            data_points,
    296296                            points_are_lats_longs):
     297       
    297298        if geo_reference is not None:
    298299            msg = """A georeference is specified yet latitude and longitude
    299300            are also specified!"""
    300301            raise ValueError, msg
     302       
    301303        if data_points is not None and not points_are_lats_longs:
    302304            msg = """Data points are specified yet latitude and
     
    324326            raise ValueError, msg
    325327       
    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)
    327330       
    328331        return data_points, Geo_reference(zone=zone)
Note: See TracChangeset for help on using the changeset viewer.