We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
I tried to use isochrone_polygon_with_alpha_shape method but I get a TypeError like the following:
isochrone_polygon_with_alpha_shape
~\AppData\Local\Continuum\anaconda3\envs\ultra-np\lib\site-packages\geonetworkx\tools\isochrones.py in isochrone_polygon_with_alpha_shape(graph, source, limit, weight, alpha_quantile, remove_holes, tolerance) 204 ego_graph = gnx.extended_ego_graph(graph, source, limit, distance=weight) 205 edge_as_lines = ego_graph.get_edges_as_line_series() --> 206 discretized_lines, _ = gnx.discretize_lines(edge_as_lines) 207 alpha_shape = get_alpha_shape_polygon(discretized_lines, alpha_quantile) 208 alpha_shape = alpha_shape.buffer(tolerance) TypeError: discretize_lines() missing 1 required positional argument: 'discretization_tol'
You can reproduce the issue with the following code:
import geonetworkx as gnx import osmnx as ox g = ox.get_digraph(ox.graph_from_bbox(45.64890, 45.58723, 8.88880, 8.80244)) gg = gnx.read_geograph_with_coordinates_attributes(g) gnx.fill_length_attribute(gg) iso_poly = gnx.isochrone_polygon_with_alpha_shape(gg, 2321989260, 500)
It seems that discretize_lines function needs an additional discretization_tol parameter to work.
discretize_lines
discretization_tol
The text was updated successfully, but these errors were encountered:
Any progress on this issue?
Sorry, something went wrong.
I solve this problem by adding some code into geonetworkx.tools.isochrones.py on line 206-207.
discretization_tol = gnx.readwrite.graph_edges_to_gdf(graph)['length'].max() discretized_lines, _ = gnx.discretize_lines(edge_as_lines, discretization_tol)
No branches or pull requests
Hello,
I tried to use
isochrone_polygon_with_alpha_shape
method but I get a TypeError like the following:You can reproduce the issue with the following code:
It seems that
discretize_lines
function needs an additionaldiscretization_tol
parameter to work.The text was updated successfully, but these errors were encountered: