mirror of
https://github.com/marceloprates/prettymaps.git
synced 2025-01-17 13:08:14 +01:00
Merge pull request #33 from G21-Goose/main
Add retain_all option to get_streets()
This commit is contained in:
commit
d2fa4993ec
@ -63,7 +63,7 @@ def get_geometries(perimeter = None, point = None, radius = None, tags = {}, per
|
||||
return geometries
|
||||
|
||||
# Get streets
|
||||
def get_streets(perimeter = None, point = None, radius = None, layer = 'streets', width = 6, custom_filter = None, buffer = 0,circle = True, dilate = 0):
|
||||
def get_streets(perimeter = None, point = None, radius = None, layer = 'streets', width = 6, custom_filter = None, buffer = 0, retain_all = False, circle = True, dilate = 0):
|
||||
|
||||
if layer == 'streets':
|
||||
layer = 'highway'
|
||||
@ -77,7 +77,7 @@ def get_streets(perimeter = None, point = None, radius = None, layer = 'streets'
|
||||
# Boundary defined by polygon (perimeter)
|
||||
elif (point is not None) and (radius is not None):
|
||||
# Fetch streets data, save CRS & project
|
||||
streets = ox.graph_from_point(point, dist = radius+dilate+buffer, custom_filter = custom_filter)
|
||||
streets = ox.graph_from_point(point, dist = radius+dilate+buffer, retain_all = retain_all, custom_filter = custom_filter)
|
||||
crs = ox.graph_to_gdfs(streets, nodes = False).crs
|
||||
streets = ox.project_graph(streets)
|
||||
# Compute perimeter from point & CRS
|
||||
|
Loading…
x
Reference in New Issue
Block a user