Skip to content

Commit

Permalink
fix radius filter
Browse files Browse the repository at this point in the history
  • Loading branch information
TJhon committed Jul 8, 2023
1 parent 42da25e commit 806351a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ data/
*__pycache__
examples/continent
examples/country
examples/subregion
examples/sub_region_pbf
examples/data-pbf

*algo*
3 changes: 1 addition & 2 deletions osrmareas/areas.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ def get_routes(
pd.concat([all_routes_df, get_osrm_route(center1, final1)])

if filter_km:
rows_inside = all_routes_df['dist_driving_km'] < radius_km
all_routes_df_crop = all_routes_df.loc[rows_inside]
all_routes_df_crop = all_routes_df.query('dist_driving_km <= @radius_km')
return all_routes_df_crop

return all_routes_df
Expand Down

0 comments on commit 806351a

Please sign in to comment.