Changeset 2391 for inundation/pmesh/mesh_interface.py
- Timestamp:
- Feb 13, 2006, 6:35:18 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pmesh/mesh_interface.py
r2282 r2391 27 27 28 28 Boundary tags is a dictionary of symbolic tags. For every tag there 29 is a list of 30 indices referring to segments associated with that tag 29 is a list of indices referring to segments associated with that tag 31 30 32 31 Resolution is the maximal area per triangle for the bounding polygon … … 51 50 # check the segment indexes - throw an error if they are out of bounds 52 51 52 #IDEA (Ole): Let us work out what the mesh_geo_reference is automatically: 53 #If bounding_polygon is absolute it would look as follows: 54 #xllcorner = min(bounding_polygon[:,0]) 55 #yllcorner = min(bounding_polygon[:,1]) 56 # 57 #mesh_geo_reference = Geo_reference(xllcorner = xllcorner, 58 # yllcorner = yllcorner, 59 # zone = "zone from bounding polygon") 60 # 61 #In addition I reckon the polygons could be of class Geospatial_data 62 53 63 m = Mesh(geo_reference=mesh_geo_reference) 54 64 55 65 #Do bounding polygon 56 66 m.add_region_from_polygon(bounding_polygon, 57 58 67 tags=boundary_tags, 68 geo_reference=poly_geo_reference) 59 69 60 70 #Find one point inside region automatically … … 62 72 excluded_polygons = [] 63 73 for polygon, res in interior_regions: 64 #polygon = convert_points_from_latlon_to_utm(P, refzone)65 74 excluded_polygons.append( polygon ) 66 75 else: … … 98 107 region = m.add_region(inner_point[0], inner_point[1]) 99 108 region.setMaxArea(res) 109 100 110 m.generate_mesh(minimum_triangle_angle=minimum_triangle_angle, 101 maximum_triangle_area=maximum_triangle_area)111 maximum_triangle_area=maximum_triangle_area) 102 112 103 113 if filename is None:
Note: See TracChangeset
for help on using the changeset viewer.