def encode_coord_line(index, x, y):
    """ Encodes given coordinate into a csv line: "index,x,y" """
    if not (isinstance(index, int) and isinstance(x, int) and isinstance(y, int)):
        raise TypeError("parameters must be integer")
    return "%d,%d,%d" % (index, x, y)