Skip to content
Snippets Groups Projects

Stats

Merged
pmagrequested to merge
stats into master
3 files
+ 32
43
Compare changes
  • Side-by-side
  • Inline

Files

+ 13
1
@@ -11,7 +11,7 @@ from networkx import MultiDiGraph, MultiGraph
@@ -11,7 +11,7 @@ from networkx import MultiDiGraph, MultiGraph
from pandas import MultiIndex, Series
from pandas import MultiIndex, Series
from numpy import float64, int64
from numpy import float64, int64
from geopandas import GeoDataFrame, read_file
from geopandas import GeoDataFrame, read_file
from shapely.geometry import Point
from shapely.geometry import Point, LineString
import contextily as cx
import contextily as cx
# local, internal
# local, internal
@@ -1229,6 +1229,18 @@ def convert_edge_path(
@@ -1229,6 +1229,18 @@ def convert_edge_path(
# return statement
# return statement
return node_path
return node_path
 
# *****************************************************************************
 
# *****************************************************************************
 
 
def create_edge_geometry(network: MultiDiGraph, edge_key) -> LineString:
 
"Returns a newly-created geometry for a given edge."
 
 
return LineString(
 
[(network.nodes[edge_key[0]][osm.KEY_OSMNX_X],
 
network.nodes[edge_key[0]][osm.KEY_OSMNX_Y]),
 
(network.nodes[edge_key[1]][osm.KEY_OSMNX_X],
 
network.nodes[edge_key[1]][osm.KEY_OSMNX_Y])]
 
)
# *****************************************************************************
# *****************************************************************************
# *****************************************************************************
# *****************************************************************************
Loading