def dicompyler_roi_coord_to_db_string(coord):
    """

    Parameters
    ----------
    coord :
        dicompyler structure coordinates from GetStructureCoordinates()

    Returns
    -------
    str
        roi string representation of an roi as formatted in the SQL database (roi_coord_string)

    """
    contours = []
    for z in coord:
        for plane in coord[z]:
            points = [z]
            for point in plane["data"]:
                points.append(str(round(point[0], 3)))
                points.append(str(round(point[1], 3)))
            contours.append(",".join(points))
    return ":".join(contours)