Exemple #1
0
    def equals(self, other, eps=None):
        '''Check if this point is equal to an other point.

           @param other: The other point (L{LatLon}).
           @keyword eps: Optional margin (float).

           @return: True if points are identical (bool).

           @raise TypeError: The other point is not L{LatLon}.

           @example:

           >>> p = LatLon(52.205, 0.119)
           >>> q = LatLon(52.205, 0.119)
           >>> e = p.equals(q)  # True
        '''
        return LatLonEllipsoidalBase.equals(self, other, eps=eps) and \
               self.height == other.height and self.datum == other.datum
    def equals(self, other, eps=None):
        '''Compare this point with an other point.

           @param other: The other point (L{LatLon}).
           @keyword eps: Optional margin (float).

           @return: True if points are identical, including
                    datum, I{ignoring height} (bool).

           @raise TypeError: The I{other} point is not L{LatLon}.

           @see: Use method L{equals3} to include height.

           @example:

           >>> p = LatLon(52.205, 0.119)
           >>> q = LatLon(52.205, 0.119)
           >>> e = p.equals(q)  # True
        '''
        return LatLonEllipsoidalBase.equals(self, other, eps=eps) \
                                and self.datum == other.datum