def getSegmentDirection(self):
    (x0, y0, x1, y1) = self.segmentBounds
    if ((x1 - x0) > 0):
        return 'E'
    elif ((x1 - x0) < 0):
        return 'W'
    elif ((y1 - y0) > 0):
        return 'S'
    elif ((y1 - y0) < 0):
        return 'N'
    else:
        return None
def getSegmentDirection(self):
    (x0, y0, x1, y1) = self.segmentBounds
    if ((x1 - x0) > 0):
        return 'E'
    elif ((x1 - x0) < 0):
        return 'W'
    elif ((y1 - y0) > 0):
        return 'S'
    elif ((y1 - y0) < 0):
        return 'N'
    else:
        return None