def graph_from_voronoi(vor, geometry):
    graph = nx.Graph()
    for i in vor.ridge_vertices:
        if i[0]>-1 and i[1]>-1:
            point1 = Point(vor.vertices[i][0])
            point2 = Point(vor.vertices[i][1])
            # Eliminate all points outside our geometry.
            if point1.within(geometry) and point2.within(geometry):
                dist = point1.distance(point2)
                graph.add_nodes_from([i[0], i[1]])
                graph.add_edge(i[0], i[1], weight=dist)
    return graph
Return a numpy one-dimensional float array that has the cell edge x
dataset/ETHPy150Open ungarj/label_centerlines/src_create_centerlines.py/graph_from_voronoi--crossover with--dataset/ETHPy150Open modflowpy/flopy/flopy/utils/reference.py/SpatialReference.get_xedge_array