コード例 #1
0
ファイル: test_make_graph.py プロジェクト: mggg/GerryChain
def test_make_graph_from_shapefile_has_crs(shapefile):
    graph = Graph.from_file(shapefile)
    df = gp.read_file(shapefile)
    assert CRS.from_json(graph.graph["crs"]).equals(df.crs)
コード例 #2
0
ファイル: test_make_graph.py プロジェクト: mggg/GerryChain
def test_make_graph_from_dataframe_has_crs(gdf_with_data):
    graph = Graph.from_geodataframe(gdf_with_data)
    assert CRS.from_json(graph.graph["crs"]).equals(gdf_with_data.crs)