Ignore:
Timestamp:
Jun 2, 2006, 1:12:20 PM (19 years ago)
Author:
ole
Message:

Changed semantics of inside_polygon (and outside_polygon) so that one point is treated as a list containing that one point. For the old boolean functionality use is_inside_polygon and is_outside_polygon.
Fixed unit tests as well

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pmesh/test_mesh_interface.py

    r3048 r3052  
    55from mesh_interface import *
    66from load_mesh.loadASCII import *
    7 from utilities.polygon import inside_polygon
     7from utilities.polygon import is_inside_polygon
    88from coordinate_transforms.geo_reference import Geo_reference,DEFAULT_ZONE
    99
     
    7474        # poly_point values are relative to the mesh geo-ref
    7575        # make them absolute
    76         self.failUnless(inside_polygon([poly_point.x+x,poly_point.y+y],
    77                                        polygon_absolute, closed = False),
     76        self.failUnless(is_inside_polygon([poly_point.x+x,poly_point.y+y],
     77                                          polygon_absolute, closed = False),
    7878                        'FAILED!')
    7979       
     
    8888        # poly_point values are relative to the mesh geo-ref
    8989        # make them absolute
    90         self.failUnless(inside_polygon([poly_point.x+x,poly_point.y+y],
    91                                        inner1_polygon_absolute,
    92                                        closed = False),
     90        self.failUnless(is_inside_polygon([poly_point.x+x,poly_point.y+y],
     91                                          inner1_polygon_absolute,
     92                                          closed = False),
    9393                        'FAILED!')
    9494       
     
    103103        # poly_point values are relative to the mesh geo-ref
    104104        # make them absolute
    105         self.failUnless(inside_polygon([poly_point.x+x,poly_point.y+y],
    106                                        inner2_polygon_absolute,
    107                                        closed = False),
     105        self.failUnless(is_inside_polygon([poly_point.x+x,poly_point.y+y],
     106                                          inner2_polygon_absolute,
     107                                          closed = False),
    108108                        'FAILED!')
    109109
Note: See TracChangeset for help on using the changeset viewer.