Changeset 2391


Ignore:
Timestamp:
Feb 13, 2006, 6:35:18 PM (18 years ago)
Author:
ole
Message:

Ideas

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pmesh/mesh_interface.py

    r2282 r2391  
    2727
    2828    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
    3130
    3231    Resolution is the maximal area per triangle for the bounding polygon
     
    5150    # check the segment indexes - throw an error if they are out of bounds
    5251
     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
    5363    m = Mesh(geo_reference=mesh_geo_reference)
    5464
    5565    #Do bounding polygon
    5666    m.add_region_from_polygon(bounding_polygon,
    57                                 tags=boundary_tags,
    58                                 geo_reference=poly_geo_reference)
     67                              tags=boundary_tags,
     68                              geo_reference=poly_geo_reference)
    5969
    6070    #Find one point inside region automatically
     
    6272        excluded_polygons = []       
    6373        for polygon, res in interior_regions:
    64             #polygon = convert_points_from_latlon_to_utm(P, refzone)           
    6574            excluded_polygons.append( polygon )
    6675    else:
     
    98107            region = m.add_region(inner_point[0], inner_point[1])
    99108            region.setMaxArea(res)
     109           
    100110    m.generate_mesh(minimum_triangle_angle=minimum_triangle_angle,
    101                    maximum_triangle_area=maximum_triangle_area)
     111                    maximum_triangle_area=maximum_triangle_area)
    102112
    103113    if filename is None:
Note: See TracChangeset for help on using the changeset viewer.