kopia lustrzana https://github.com/marceloprates/prettymaps
Porównaj commity
2 Commity
3f3b8be923
...
f895570923
Autor | SHA1 | Data |
---|---|---|
marceloprates | f895570923 | |
marceloprates | 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):
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
osmnx==1.1.2
|
||||
osmnx==1.2.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",
|
||||
|
|
Ładowanie…
Reference in New Issue