def get_coordinates(array_islands):
    """
    First extract the connection (edge) that every island connects to, then
    extract the coordinate of that island. Edges are returned in an array of
    tuples, coordinates in a dictionary of arrays.
    """
    # retrieve the connection
    edges = []
    for index, isle in enumerate(array_islands[1:], start=1):
        edges.append((index, isle.connection))

    # retrieve the coordinates
    pos = dict((index, [*isle.coord]) for index, isle in enumerate(array_islands))

    return edges, pos