def FindMatchingPolys(self, start_point, end_point, max_radius=150):
    """
    Returns a list of polylines in the collection that have endpoints
    within max_radius of the given start and end points.
    """
    matches = []
    for shape in self._name_to_shape.itervalues():
      if start_point.GetDistanceMeters(shape.GetPoint(0)) < max_radius and \
        end_point.GetDistanceMeters(shape.GetPoint(-1)) < max_radius:
        matches.append(shape)
    return matches
def FindMatchingPolys ( self , start_point , end_point , max_radius = 150 ) : matches = [ ] for shape in self . _name_to_shape . itervalues ( ) : if start_point . GetDistanceMeters ( shape . GetPoint ( 0 ) ) < max_radius and end_point . GetDistanceMeters ( shape . GetPoint ( - 1 ) ) < max_radius : matches . append ( shape ) return matches
Returns a list of polylines in the collection that have endpoints
    within max_radius of the given start and end points.