Changeset 3320
- Timestamp:
- Jul 12, 2006, 5:43:01 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/geospatial_data/geospatial_data.py
r3312 r3320 5 5 6 6 from os import access, F_OK, R_OK 7 from Numeric import concatenate, array, Float, shape, reshape 7 from Numeric import concatenate, array, Float, shape, reshape, ravel 8 8 9 9 10 from utilities.numerical_tools import ensure_numeric … … 210 211 points_are_lats_longs): 211 212 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!""" 213 215 raise ValueError, msg 214 216 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!""" 216 219 raise ValueError, msg 217 220 … … 221 224 raise ValueError, msg 222 225 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:]) 227 228 228 229 if latitudes is None and longitudes is None:
Note: See TracChangeset
for help on using the changeset viewer.