def checkBoundaryIntersection(tolerance, coord, boundary):
    """
    :param tolerance: Accuracy of decimal places wanted. Enter as 0.01, etc.
    :param coord: The coordinate you wish to check [lat, lng]
    :param boundary: The boundary in BBOX format [lat1, lng1, lat2, lng2]
    :return: Boolean return if coord intersects boundary with accuracy of tolerance.
    """
    lat, lng = coord
    lat1 = boundary[0]
    lat2 = boundary[2]
    lng1 = boundary[1]
    lng2 = boundary[2]

    # Check if on Western Boundary
    if (lat > lat1) and (lat < lat2) and (abs(lng-lng1) < tolerance):
        return True

    # Check if on Eastern boundary
    if (lat > lat1) and (lat < lat2) and (abs(lng-lng2) < tolerance):
        return True

    # Check if on southern boundary
    if (lng > lng1) and (lng < lng2) and (abs(lat - lat1) < tolerance):
        return True

    # Check if on Northern boundary
    if (lng > lng1) and (lng < lng2) and (abs(lat - lat2) < tolerance):
        return True

    return False