mirror of
https://github.com/marceloprates/prettymaps.git
synced 2025-01-16 20:48:13 +01:00
Updated version number, minor changes to draw.py and requirements.txt
This commit is contained in:
parent
3f3b8be923
commit
78d050ee5b
@ -527,6 +527,7 @@ def create_background(
|
||||
Returns:
|
||||
Tuple[BaseGeometry, float, float, float, float, float, float]: background geometry, bounds, width and height
|
||||
"""
|
||||
|
||||
# Create background
|
||||
background_pad = 1.1
|
||||
if "background" in style and "pad" in style["background"]:
|
||||
@ -539,6 +540,9 @@ def create_background(
|
||||
background_pad,
|
||||
)
|
||||
|
||||
if "background" in style and "dilate" in style["background"]:
|
||||
background = background.buffer(style['background'].pop("dilate"))
|
||||
|
||||
# Get bounds
|
||||
xmin, ymin, xmax, ymax = background.bounds
|
||||
dx, dy = xmax - xmin, ymax - ymin
|
||||
@ -958,7 +962,7 @@ def plot(
|
||||
zorder = style["background"].pop(
|
||||
"zorder") if "zorder" in style["background"] else -1
|
||||
ax.add_patch(PolygonPatch(
|
||||
background, **style["background"], zorder=zorder))
|
||||
background, **{k:v for k,v in style["background"].items() if k != 'dilate'}, zorder=zorder))
|
||||
|
||||
# 10. Draw credit message
|
||||
if (mode == "matplotlib") and (credit != False) and (not multiplot):
|
||||
|
@ -2,4 +2,5 @@ osmnx==1.1.2
|
||||
tabulate==0.8.9
|
||||
Shapely>=1.8,<2.0
|
||||
descartes==1.1.0
|
||||
ipykernel==5.3.4
|
||||
pyyaml==6.0.0
|
||||
|
2
setup.py
2
setup.py
@ -7,7 +7,7 @@ presets_dir = os.path.abspath(os.path.join(os.path.pardir, 'presets'))
|
||||
|
||||
setup(
|
||||
name="prettymaps",
|
||||
version="v0.1.3",
|
||||
version="v0.1.4",
|
||||
description="A simple python library to draw pretty maps from OpenStreetMap data",
|
||||
long_description=parent_dir.joinpath("README.md").read_text(),
|
||||
long_description_content_type="text/markdown",
|
||||
|
Loading…
x
Reference in New Issue
Block a user