Changeset 2541 for inundation/pyvolution


Ignore:
Timestamp:
Mar 13, 2006, 6:20:26 PM (19 years ago)
Author:
sexton
Message:

fixed dem2pts AGAIN!!!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/data_manager.py

    r2538 r2541  
    12041204    nn = 0
    12051205    k = 0
     1206    i1_0 = 0
     1207    j1_0 = 0
    12061208    for i in range(nrows):
    12071209        y = (nrows-i)*cellsize + yllcorner
     
    12161218                    j1_0 = j
    12171219                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   
    12231231    # dimension definitions
    12241232    nrows_in_bounding_box = int(round((northing_max-northing_min)/cellsize))
     
    12571265        no_NODATA = sum(v == NODATA_value)
    12581266        if no_NODATA > 0:
    1259             newcols = ncols_in_bounding_box - no_NODATA
     1267            newcols = len(v) - no_NODATA #ncols_in_bounding_box - no_NODATA
    12601268        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,:]
    12631273        telev = zeros(newcols, Float)
    12641274        tpoints = zeros((newcols, 2), Float)
    1265            
    12661275
    12671276        local_index = 0
Note: See TracChangeset for help on using the changeset viewer.