Changeset 2541 for inundation/pyvolution
- Timestamp:
- Mar 13, 2006, 6:20:26 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/data_manager.py
r2538 r2541 1204 1204 nn = 0 1205 1205 k = 0 1206 i1_0 = 0 1207 j1_0 = 0 1206 1208 for i in range(nrows): 1207 1209 y = (nrows-i)*cellsize + yllcorner … … 1216 1218 j1_0 = j 1217 1219 k += 1 1218 1219 1220 index1 = j1_0 1221 index2 = i + 1 1222 1220 1221 index1 = j1_0 1222 index2 = j 1223 index3 = i1_0 1224 index4 = i 1225 1226 1227 index2 += 1 1228 nrows2 = index4 - index3 1229 ncols2 = index2 - index1 + 1 1230 1223 1231 # dimension definitions 1224 1232 nrows_in_bounding_box = int(round((northing_max-northing_min)/cellsize)) … … 1257 1265 no_NODATA = sum(v == NODATA_value) 1258 1266 if no_NODATA > 0: 1259 newcols = ncols_in_bounding_box - no_NODATA1267 newcols = len(v) - no_NODATA #ncols_in_bounding_box - no_NODATA 1260 1268 else: 1261 newcols = ncols_in_bounding_box 1262 1269 newcols = len(v) #ncols_in_bounding_box 1270 1271 #print 'here', len(v), no_NODATA, newcols, v 1272 #print 'here again', dem_elevation_r[i,:] 1263 1273 telev = zeros(newcols, Float) 1264 1274 tpoints = zeros((newcols, 2), Float) 1265 1266 1275 1267 1276 local_index = 0
Note: See TracChangeset
for help on using the changeset viewer.