diff --git a/README.md b/README.md index 100142e..4cb2dcb 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # wielka-wyspa -Wrocław / Wielka Wyspa / Hackerspace w prettymaps \ No newline at end of file +Wrocław / Wielka Wyspa / Hackerspace w [prettymaps](https://github.com/marceloprates/prettymaps) + +![](wielka-wyspa-HS.png) \ No newline at end of file diff --git a/wielka-wyspa-HS-A2.pdf b/wielka-wyspa-HS-A2.pdf new file mode 100644 index 0000000..546f9e7 Binary files /dev/null and b/wielka-wyspa-HS-A2.pdf differ diff --git a/wielka-wyspa-HS-A2.svg b/wielka-wyspa-HS-A2.svg new file mode 100644 index 0000000..6a08768 --- /dev/null +++ b/wielka-wyspa-HS-A2.svg @@ -0,0 +1,89476 @@ + +2026-02-23T19:24:32.785722image/svg+xmlMatplotlib v3.10.8, https://matplotlib.org/17°05′12.934″E51°06′16.506″N + + + + + + + + + + + + + + + + + + + + + +WrocławWielka WyspaData © OpenStreetMap contributorsgithub.com/marceloprates/prettymaps diff --git a/wielka-wyspa-HS.png b/wielka-wyspa-HS.png new file mode 100644 index 0000000..439bfd7 Binary files /dev/null and b/wielka-wyspa-HS.png differ diff --git a/wielka-wyspa.py b/wielka-wyspa.py new file mode 100644 index 0000000..cef8538 --- /dev/null +++ b/wielka-wyspa.py @@ -0,0 +1,131 @@ +# Wrocław / Wielka Wyspa / Hackerspace w prettymaps +# https://github.com/marceloprates/prettymaps + +import osmnx as ox +import prettymaps +import matplotlib.pyplot as plt + +COLOR_HS = "#fdb515" +COLOR_HS_LIGHT = "#ffecc3" +COLOR_WATER = "#1fa1f8" +COLOR_BLACK = "#000000" +COLOR_WHITE = "#ffffff" + +PAGE_SIZES = { + "A6": (5.83, 4.13), + "A5": (8.27, 5.83), + "A4": (11.69, 8.27), + "Square": (8.27, 8.27), + "A3": (16.54, 11.69), + "A2": (23.39, 16.54), + "A1": (33.11, 23.39), +} + + +ox.settings.use_cache = True +ox.settings.cache_folder = "/tmp/.cache/osmnx" + + +prettymaps.create_preset( + "wielka-wyspa", + layers = { + "perimeter": {}, + "streets": { + "width": { + "trunk": 3, + "primary": 2.5, + "secondary": 2, + "tertiary": 1.5, + "residential": 0.5, + "pedestrian": 0.5, + "footway": 0.5, + "path": 0.5 + } + }, + "building": { + "tags": { + "building": True, + "leisure": [ + "track", + "pitch" + ] + } + }, + "water": { + "tags": { + "natural": [ + "water", + "bay" + ] + } + }, + }, + style = { + "background": { + "fill": True, + "fc": COLOR_WATER, + "lw": 0, +# "hatch": "---", + "zorder": -1 + }, + "perimeter": { + "fill": True, + "fc": COLOR_HS_LIGHT, + "lw": 0.5, + "zorder": 0 + }, + "water": { + "fill": True, + "fc": COLOR_WATER, + "lw": 0, + "zorder": 1 + }, + "streets": { + "fc": "#000000", + "ec": "#ffffff", + "lw": 0, + "zorder": 3 + }, + "building": { + "palette": [ + COLOR_HS + ], + "ec": "#000000", + "lw": 0.5, + "zorder": 4 + } + } +) + +osm_credit={ + "text": "Data © OpenStreetMap contributors\ngithub.com/marceloprates/prettymaps", + "x": 0.03, + "y": 0.03, + "horizontalalignment": "left", + "verticalalignment": "bottom", + "fontsize": 6, + "fontfamily" : "Ubuntu", + "fontname": "Ubuntu Mono", + "color" : COLOR_BLACK, + "bbox": { + # "boxstyle": "round,pad=0.35", + # "fc": "black", + # "ec": COLOR_HS, + "lw": 0, + "alpha": 0.0, + }, +} + + +plot = prettymaps.plot( + 'Wielka Wyspa', +# 'Czasoprzestrzeń', + dilate = 0, + figsize = PAGE_SIZES["A2"], + preset = 'wielka-wyspa', + credit = osm_credit, + show = True, + adjust_aspect_ratio = False, +) + +