Changeset 1219
- Timestamp:
- Apr 12, 2005, 12:08:58 PM (20 years ago)
- Location:
- inundation/ga/storm_surge
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/alpha_shape/test_alpha_shape.py
r987 r1219 202 202 203 203 204 def test_expand_pinch(self): 205 a = [1.0, 1.0] 206 b = [1.0, 5.0] 207 c = [4.0, 3.0] 208 d = [8.0, 5.0] 209 e = [8.0, 1.0] 210 211 alpha = Alpha_Shape([a,b,c,d,e]) 212 alpha.set_boundary_type(raw_boundary=True, 213 remove_holes=False, 214 smooth_indents=False, 215 expand_pinch=True) 216 result = alpha.get_boundary() 217 #print "result",result 218 answer = [(1, 0), (4, 3), (0, 4), (3, 1)] 219 assert allclose(answer, result) 220 221 def ztest_sharp_indents(self): 222 a = [1.0, 1.0] 223 b = [1.0, 5.0] 224 c = [4.0, 3.0] 225 d = [8.0, 5.0] 226 e = [8.0, 1.0] 227 228 alpha = Alpha_Shape([a,b,c,d,e]) 229 alpha.set_boundary_type(raw_boundary=True, 230 remove_holes=False, 231 smooth_indents=False, 232 expand_pinch=True) 233 result = alpha.get_boundary() 234 #print "result",result 235 answer = [(1, 0), (4, 3), (0, 4), (3, 1)] 236 assert allclose(answer, result) 204 237 #------------------------------------------------------------- 205 238 if __name__ == "__main__": -
inundation/ga/storm_surge/pmesh/documentation/issues.txt
r1179 r1219 3 3 OPEN - issues that have not beeen resolved 4 4 5 6 7 Issue: triangles_to_polySet (outlining the current set) sometimes duplicates vertices. 8 Now that is fixed, but segments that overlap (ie one big line that gets little ones drawn on it) break triangle. 9 10 Suggested action: make a dictionary of Hough transforms (parametric lines i.e. angle, x-intercept) of the segments. Check any that take up the same space. Fix overlapping lines. 11 12 13 Issue: If some triangles have tags and others don't then the data 14 structure (a list of lists) is dificult to use in Numeric. 15 eg. 16 SyntaxError: invalid syntax 17 >>> a = array(['a','b']); print a 18 [a b] 19 >>> a = array(['a','b','']); print a 20 Traceback (most recent call last): 21 File "<stdin>", line 1, in ? 22 TypeError: an integer is required 23 >>> a = array([['a'],['b'],['']]); print a 24 Traceback (most recent call last): 25 File "<stdin>", line 1, in ? 26 TypeError: an integer is required 27 >>> a = array([['a'],['b'],['']]).astype(ListType); print a 28 Traceback (most recent call last): 29 File "<stdin>", line 1, in ? 30 TypeError: an integer is required 31 >>> a = array([['a'],['b'],['c']]).astype(ListType); print a 32 Traceback (most recent call last): 33 File "<stdin>", line 1, in ? 34 TypeError: an integer is required 35 >>> a = array(['a','b','']); print a 36 Traceback (most recent call last): 37 File "<stdin>", line 1, in ? 38 TypeError: an integer is required 39 >>> a = array(['a','b','c']); print a 40 [a b c] 41 >>> a = array([['a'],['b'],['c']]); print a 42 Traceback (most recent call last): 43 File "<stdin>", line 1, in ? 44 TypeError: an integer is required 45 >>> a = array([['a'],['a'],['a']]); print a 46 Traceback (most recent call last): 47 File "<stdin>", line 1, in ? 48 TypeError: an integer is required 49 >>> a = array([['a'],['a'],['a']]); print a 50 Traceback (most recent call last): 51 File "<stdin>", line 1, in ? 52 TypeError: an integer is required 53 >>> a = array([['a'],['a'],['a']], Character); print a 54 [[ [a]] 55 [ [a]] 56 [ [a]]] 57 >>> a = array([['a'],['a'],['']], Character); print a 58 Traceback (most recent call last): 59 File "<stdin>", line 1, in ? 60 TypeError: an integer is required 61 >>> a = array([['a'],['a'],['','a']], Character); print a 62 Traceback (most recent call last): 63 File "<stdin>", line 1, in ? 64 TypeError: an integer is required 65 >>> a = array([['a','j'],['a','j'],['j','a']], Character); print a 66 Traceback (most recent call last): 67 File "<stdin>", line 1, in ? 68 TypeError: an integer is required 69 >>> a = array(['a','a',''], Character); print a 70 [[a] 71 [a] 72 [ ]] 73 Solution - use a list structure, instead of list of lists 74 5 Issue: Add export seg outline file back into pmesh 6 7 Issue: triangles_to_polySet (outlining the current set) sometimes 8 duplicates vertices. Now that is fixed, but segments that overlap (ie 9 one big line that gets little ones drawn on it) break triangle. 10 11 Suggested action: make a dictionary of Hough transforms (parametric 12 lines i.e. angle, x-intercept) of the segments. Check any that take up 13 the same space. Fix overlapping lines. 75 14 76 15 Issue: Red mesh selected for refinement seems to be 'behind' the green … … 169 108 CLOSED - issues that have beeen resolved 170 109 ************ 171 110 Issue: If some triangles have tags and others don't then the data 111 structure (a list of lists) is dificult to use in Numeric. 112 Solution - use a list structure, instead of list of lists 113 Closed - used a list structure, instead of list of lists 114 172 115 Issue (Ole): I couldn't get pmesh to write mesh in the .msh format 173 116 Importance: Mid -
inundation/ga/storm_surge/pmesh/documentation/mesh_gen_SRS.txt
r349 r1219 157 157 the user has done a change, and the mesh hasn't been generated. If 158 158 there is no generated mesh do not prompt. - DONE 159 159 160 access to triangle mesh generator, 161 user can select max area in region - P80 - DONE 162 163 - .xya file, which has vertex information, will have headers naming 164 the attributes in the first row. The headers will be strings 165 representing a label for the attribute information. This information 166 will be space deliminated. There will be no ordering imposed. The 167 name, column index mapping will be in the .tsh file. 168 - x and y headings are manitory. - not done, requirements changed 169 - Missing fields will cause an error during loading of the xya file. 170 171 160 172 NOT IMPLIMENTED 161 162 - specify a function that is used to set the vertex attribute values [maybe 163 not have this at all, rather a python script can be written to 164 specify the values]- DONT DO 165 - edit vertex attribute -P40 166 167 - specify if there is segment attribute information. [there is always 168 seg att info. therefore don't need to specify]-P40 169 173 - show file name in title bar 174 175 - Have a divide all max areas by value x function. - P80 176 177 - triang.genMesh - get triangle compiled automatically. 178 179 - able to specify a 'circular' region by specifying center, radius and 180 number of number of segments. (The functionality is there as a hack. 181 need to add gui etc.) - P100 182 170 183 - Display mouse point position [x,y] - P60 171 172 access to triangle mesh generator,173 user can select max area in region - P80174 184 175 185 - Calculate total area enclosed (maybe a buton?) -P80 … … 229 239 - run triangle as a seperate thread, so if it's not converging it can 230 240 be stopped. - P100 231 232 REQUIREMENTS FROM 28/6/04 MEETING 233 234 - .xya file, which has vertex information, will have headers naming 235 the attributes in the first row. The headers will be strings 236 representing a label for the attribute information. This information 237 will be space deliminated. There will be no ordering imposed. The 238 name, column index mapping will be in the .tsh file. 239 - x and y headings are manitory. 240 - Missing fields will cause an error during loading of the xya file. 241 242 241 243 242 - 244 243 __________________ -
inundation/ga/storm_surge/pmesh/load_mesh/loadASCII.py
r1183 r1219 47 47 Points files are .xya for ascii and .pts for NetCDF 48 48 Mesh files are .tsh for ascii and .msh for NetCDF 49 49 50 Note: point att's have no titles - that's currently ok, since least 51 squares adds the point info to vertices, and they have titles 50 52 """ 53 ##FIXME (DSG-DSG) Is the dict format mentioned above a list of a numeric array? 54 # Needs to be defined 55 ##FIXME (DSG-DSG) if the ascii file isn't .xya give a better error message. 56 51 57 52 58 from string import find, rfind … … 61 67 NOMAXAREA=-999 62 68 63 #FIXME this is used by least_squares - is this the best function for it to use? 69 #FIXME (DSG-DSG) this is used by least_squares - 70 # is this the best function for it to use? 64 71 def mesh_file_to_mesh_dictionary(fileName): 65 72 """Load a pmesh file. Returning the mesh dictionary. -
inundation/ga/storm_surge/pyvolution/interpolate_sww.py
r1137 r1219 19 19 Geoscience Australia, 2004. 20 20 """ 21 22 ##FIXME (DSG-DSG) no sww file? give a better error message. 21 23 22 24 from Numeric import transpose -
inundation/ga/storm_surge/pyvolution/region.py
r1108 r1219 6 6 operate. 7 7 """ 8 8 # FIXME (DSG-DSG) add better comments 9 9 10 10 class Region:
Note: See TracChangeset
for help on using the changeset viewer.