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

add buffer_geometry helper function to utils_geo module #1214

Merged
merged 3 commits into from
Sep 7, 2024
Merged

Conversation

gboeing
Copy link
Owner

@gboeing gboeing commented Aug 22, 2024

This new function offers users a small quality-of-life improvement for use cases like:

For example, to download a graph within a 500 meter buffer of a city's boundaries:

import osmnx as ox
geom = ox.geocoder.geocode_to_gdf("Piedmont, CA, USA").iloc[0]["geometry"]
G = ox.graph.graph_from_polygon(ox.utils_geo.buffer_geometry(geom, 500), network_type="drive")

Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.31%. Comparing base (94b7e73) to head (95846f2).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1214   +/-   ##
=======================================
  Coverage   98.31%   98.31%           
=======================================
  Files          24       24           
  Lines        2369     2374    +5     
=======================================
+ Hits         2329     2334    +5     
  Misses         40       40           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant