Changeset 3320


Ignore:
Timestamp:
Jul 12, 2006, 5:43:01 PM (19 years ago)
Author:
duncan
Message:

using tip from Ole

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/geospatial_data/geospatial_data.py

    r3312 r3320  
    55
    66from os import access, F_OK, R_OK
    7 from Numeric import concatenate, array, Float, shape, reshape
     7from Numeric import concatenate, array, Float, shape, reshape, ravel
     8
    89
    910from utilities.numerical_tools import ensure_numeric
     
    210211                            points_are_lats_longs):
    211212        if geo_reference is not None:
    212             msg = """A georeference is specified yet latitude and longitude are also specified!"""
     213            msg = """A georeference is specified yet latitude and longitude
     214            are also specified!"""
    213215            raise ValueError, msg
    214216        if data_points is not None and not points_are_lats_longs:
    215             msg = """Data points are specified yet latitude and longitude are also specified!"""
     217            msg = """Data points are specified yet latitude and
     218            longitude are also specified!"""
    216219            raise ValueError, msg
    217220       
     
    221224                raise ValueError, msg
    222225            lats_longs = ensure_numeric(data_points)
    223             latitudes = lats_longs[:,0:1]
    224             latitudes = reshape(latitudes,(latitudes.shape[0],))
    225             longitudes = lats_longs[:,1:]
    226             longitudes = reshape(longitudes,(longitudes.shape[0],))
     226            latitudes = ravel(lats_longs[:,0:1])
     227            longitudes = ravel(lats_longs[:,1:])
    227228           
    228229        if latitudes is None and longitudes is None:
Note: See TracChangeset for help on using the changeset viewer.