In the case of Turin, there is one routed edge of the triangulation that is represented by a MultiLineString.
Steps to verify the existance of a MultiLineString:
- Add a checkpoint in the middle of
growbikenet.growbikenet.growbiknet()
def growbikenet():
(...)
grown_bikenet_edges = create_gdf_with_geoms(grown_bikenet_edges_abstract, edges)
progress_bar.update(1)
grown_bikenet_edges_checkpoint = grown_bikenet_edges.copy()
(...)
return edges_ranked, grown_bikenet_edges_checkpoint
- Run
growbikenet() for Turin
from growbikenet import growbikenet
edges_ranked, grown_bikenet_edges_checkpoint = growbikenet(
city_name = "Turin",
export_data = False
)
- Check the geometry types of
grown_bikenet_edges_checkpoint
>>> grown_bikenet_edges_checkpoint['geometry'].geom_type.value_counts()
LineString 319
MultiLineString 1
Name: count, dtype: int64
Supposedly, all routed edges of the triangulation should be represented by a LineString geometry, as pointed out in growbikenet.functions.create_gdf_with_geoms()
def create_gdf_with_geoms(df, edges):
(...)
# Merge multilinestring into linestring where possible (should be possible everywhere)
gdf["geometry"] = gdf.line_merge()
return gdf
For Turin, there seems to be an edge in the triangulation where the routed version has a loop, and therefore, the geometry is kept as a MultiLineString, with 3 LineStrings.
This bug was found in the context of building the function growbikenet.functions.add_point_data_to_net()
In the case of Turin, there is one routed edge of the triangulation that is represented by a MultiLineString.
Steps to verify the existance of a MultiLineString:
growbikenet.growbikenet.growbiknet()growbikenet()for Turingrown_bikenet_edges_checkpointSupposedly, all routed edges of the triangulation should be represented by a LineString geometry, as pointed out in
growbikenet.functions.create_gdf_with_geoms()For Turin, there seems to be an edge in the triangulation where the routed version has a loop, and therefore, the geometry is kept as a MultiLineString, with 3 LineStrings.
This bug was found in the context of building the function
growbikenet.functions.add_point_data_to_net()