mirror of
https://github.com/marceloprates/prettymaps.git
synced 2025-09-01 18:32:45 +02:00
Minor formating
This commit is contained in:
@@ -39,7 +39,7 @@ def show_palette(palette, description = ''):
|
|||||||
f''
|
f''
|
||||||
for c in palette
|
for c in palette
|
||||||
]
|
]
|
||||||
|
|
||||||
display(Markdown((description)))
|
display(Markdown((description)))
|
||||||
display(Markdown(tabulate(pd.DataFrame(colorboxes), showindex = False)))
|
display(Markdown(tabulate(pd.DataFrame(colorboxes), showindex = False)))
|
||||||
|
|
||||||
@@ -179,4 +179,4 @@ def plot(
|
|||||||
plot_shapes(layers_dict[layer], ax, **layer_kwargs[layer])
|
plot_shapes(layers_dict[layer], ax, **layer_kwargs[layer])
|
||||||
|
|
||||||
# Return perimeter
|
# Return perimeter
|
||||||
return layers_dict['perimeter']
|
return layers_dict['perimeter']
|
||||||
|
@@ -44,7 +44,7 @@ def get_footprints(perimeter = None, point = None, radius = None, footprint = 'b
|
|||||||
# Boundary defined by polygon (perimeter)
|
# Boundary defined by polygon (perimeter)
|
||||||
footprints = ox.geometries_from_polygon(union(perimeter.geometry), tags = {footprint: True} if type(footprint) == str else footprint)
|
footprints = ox.geometries_from_polygon(union(perimeter.geometry), tags = {footprint: True} if type(footprint) == str else footprint)
|
||||||
perimeter = union(ox.project_gdf(perimeter).geometry)
|
perimeter = union(ox.project_gdf(perimeter).geometry)
|
||||||
|
|
||||||
elif (point is not None) and (radius is not None):
|
elif (point is not None) and (radius is not None):
|
||||||
# Boundary defined by circle with radius 'radius' around point
|
# Boundary defined by circle with radius 'radius' around point
|
||||||
footprints = ox.geometries_from_point(point, dist = radius, tags = {footprint: True} if type(footprint) == str else footprint)
|
footprints = ox.geometries_from_point(point, dist = radius, tags = {footprint: True} if type(footprint) == str else footprint)
|
||||||
@@ -100,7 +100,7 @@ def get_streets(perimeter = None, point = None, radius = None, dilate = 6, custo
|
|||||||
|
|
||||||
if not isinstance(streets, Iterable):
|
if not isinstance(streets, Iterable):
|
||||||
streets = [streets]
|
streets = [streets]
|
||||||
|
|
||||||
streets = list(map(pathify, streets))
|
streets = list(map(pathify, streets))
|
||||||
|
|
||||||
return streets, perimeter
|
return streets, perimeter
|
||||||
|
Reference in New Issue
Block a user