Changeset 9199
- Timestamp:
- Jun 18, 2014, 11:42:23 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/utilities/plot_utils.py
r9195 r9199 789 789 raise Exception, 'No spatial reference information given' 790 790 791 791 792 ds.SetProjection(srs.ExportToWkt()) 792 793 … … 797 798 #import pdb 798 799 #pdb.set_trace() 800 import scipy 799 801 800 802 outband = ds.GetRasterBand(1) 803 outband.SetNoDataValue(numpy.nan) 801 804 outband.WriteArray(data) 802 805 … … 942 945 #index_qFun=scipy.interpolate.LinearNDInterpolator(swwXY,scipy.arange(len(swwX),dtype='int64').transpose()) 943 946 944 gridXY_array=scipy.ascontiguousarray([scipy.concatenate(gridX),scipy.concatenate(gridY)]).transpose() 947 #print 'index_qFun', index_qFun 948 949 gridXY_array=scipy.array([scipy.concatenate(gridX),scipy.concatenate(gridY)]).transpose() 950 #gridXY_array=scipy.concatenate((gridX,gridY)).transpose() 951 952 gridXY_array=scipy.ascontiguousarray(gridXY_array) 953 #print gridXY_array.flags['C_CONTIGUOUS'] 954 #print 'GRIDXY_ARRAY', gridXY_array.shape 955 945 956 gridqInd=index_qFun(gridXY_array) 946 957 … … 949 960 from anuga.geometry.polygon import outside_polygon 950 961 cut_points = outside_polygon(gridXY_array, bounding_polygon) 962 963 #print cut_points.shape 951 964 #cut_points=(nxutils.points_inside_poly(gridXY_array, bounding_polygon)==False).nonzero()[0] 952 965 … … 991 1004 if(bounding_polygon is not None): 992 1005 # Cut the points outside the bounding polygon 993 gridq[cut_points]= scipy.nan1006 gridq[cut_points]= numpy.nan 994 1007 995 1008 # Make name for output file
Note: See TracChangeset
for help on using the changeset viewer.