Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in network topology #29

Closed
jGaboardi opened this issue Nov 4, 2020 · 1 comment
Closed

Bug in network topology #29

jGaboardi opened this issue Nov 4, 2020 · 1 comment

Comments

@jGaboardi
Copy link
Owner

There appears to be a major bug that has cropped up since the dissertation version on this code.

  • It seems to be within utils.update_adj(), but can't pinpoint where exactly it happens.
  • It occurs when def_graph_elems=True

To reproduce:

bbox = (-84.279,30.480,-84.245,30.505)
f = "zip://test_data/Edges_Leon_FL_2010.zip!Edges_Leon_FL_2010.shp"
gdf = geopandas.read_file(f, bbox=bbox)
gdf = gdf.to_crs("epsg:2779")
yes_roads = gdf["MTFCC"].str.startswith("S")
roads = gdf[yes_roads].copy()

kwargs = {"s_data": roads.copy(), "from_raw": True}
attr_kws = {"attr1": ATTR1, "attr2": ATTR2}
kwargs.update(attr_kws)
comp_kws = {"record_components": True, "largest_component":True}
kwargs.update(comp_kws)
graph_elems_kws = {"def_graph_elems": True}
kwargs.update(graph_elems_kws)
geom_kws = {"record_geom": True, "calc_len": True}
kwargs.update(geom_kws)
mtfcc_kws = {"discard_segs": discard_segs, "skip_restr": SKIP_RESTR}
mtfcc_kws.update({"mtfcc_split": INTRST, "mtfcc_intrst": INTRST})
mtfcc_kws.update({"mtfcc_split_grp": SPLIT_GRP, "mtfcc_ramp": RAMP})
mtfcc_kws.update({"mtfcc_split_by": SPLIT_BY, "mtfcc_serv": SERV_DR})
kwargs.update(mtfcc_kws)
net = tigernet.Network(**kwargs)
IndexError: list index out of range
@jGaboardi jGaboardi self-assigned this Nov 4, 2020
@jGaboardi jGaboardi added this to To do in pre-release build Nov 5, 2020
jGaboardi added a commit that referenced this issue Nov 10, 2020
@jGaboardi
Copy link
Owner Author

Addressed in c88966c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

1 participant