1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
| from prettymaps import *
import vsketch
import osmnx as ox
import matplotlib.font_manager as fm
from matplotlib import pyplot as plt
from descartes import PolygonPatch
from shapely.geometry import *
from shapely.affinity import *
from shapely.ops import unary_union
fig, ax = plt.subplots(figsize = (20, 20), constrained_layout = True)
dilate = 100
doCircle = False
layers = plot(
'Brandenburger Tor',
# Oder Koordinaten (52.516344, 13.377737)
radius = 970,
ax = ax,
layers = {
'perimeter': {'circle': doCircle, 'dilate': dilate},
'streets': {
'width': {
'motorway': 8,
'motorway_link': 3,
'service': 1,
'trunk': 6,
'primary': 6,
'secondary': 5,
'tertiary': 4,
'residential': 2,
'living_street': 2,
'pedestrian': 1.25,
'footway': 1.25,
'sideway': 1.25,
'track': 1,
'bridleway': 1,
'cycleway': 1,
'path': 0.5,
'unclassified': 3,
'construction': 1,
}
},
'building': {'tags': {'building': True}, 'union': True,'circle': doCircle, 'dilate': dilate},
'water': {'tags': {'natural': ['water', 'bay', 'wetland'], 'waterway': ['ditch', 'stream', 'weir'], 'landuse': ['basin', 'reservoir'], 'water': True},'circle': doCircle, 'dilate': dilate},
'green': {'tags': {'landuse': ['grass', 'allotments', 'village_green', 'allotments', 'nature_reserve', 'recreation_ground', 'cemetery', 'meadow'], 'natural': ['island', 'grassland', 'scrub'], 'leisure': ['park', 'garden', 'sports_centre', 'playground']},'circle': doCircle, 'dilate': dilate},
'cemeterystuff': {'tags': {'landuse': ['cemetery']},'circle': doCircle, 'dilate': dilate},
'railway': {'custom_filter': '["railway"~"rail|light_rail|subway|tram"]', 'width': 2,'circle': doCircle, 'dilate': dilate},
'forest': {'tags': {'landuse': ['forest'], 'natural': ['wood']},'circle': doCircle, 'dilate': dilate},
'agriculture': {'tags':{'landuse': ['farmland']},'circle': doCircle, 'dilate': dilate},
'developingLand': {'tags': {'landuse': ['brownfield', 'greenfield', 'construction', 'landfill']},'circle': doCircle, 'dilate': dilate},
'sportstuff': {'tags': { 'leisure': ['pitch', 'track'] },'circle': doCircle, 'dilate': dilate},
'parkplatz': {'tags': {'amenity': ['parking'], 'aeroway': ['apron', 'runway', 'taxiway']},'circle': doCircle, 'dilate': dilate},
'gleisbett': {'tags': {'landuse': ['railway', 'industrial']},'circle': doCircle, 'dilate': dilate}
},
drawing_kwargs = {
'background': {'fc': '#F2F4CB', 'ec': '#dadbc1', 'hatch': 'ooo...', 'zorder': -1},
'perimeter': {'fc': '#F7F3F5', 'ec': '#2F3737', 'lw': 3, 'hatch': 'ooo...', 'hatch_c': '#EFE7EB', 'zorder': 0},
'green': {'fc': '#AABD8C', 'ec': '#2F3737', 'lw': 0, 'zorder': 1},
'water': {'fc': '#a1e3ff', 'lw': 0, 'zorder': 3},
'streets': {'fc': '#3b4545', 'lw': 0, 'zorder': 4},
'building': {'palette': ['#433633', '#FF5E5B'], 'ec': '#2F3737', 'lw': 0, 'zorder': 3},
'railway': {'fc': '#a8a8a8', 'ec': '#FF0000', 'alpha': 1, 'lw': 0, 'zorder': 3},
'forest': {'fc': '#228b22', 'ec': '#2F3737', 'lw': 0, 'zorder': 1},
'agriculture': {'fc': '#f5d6a8', 'ec': '#2F3737', 'lw': 0, 'zorder': 1},
'developingLand': {'fc': '#898878', 'ec': '#2F3737', 'lw': 0, 'zorder': 1},
'sportstuff': {'fc': '#66A457', 'ec': '#32512b', 'lw': 0.3, 'zorder': 1},
'parkplatz': {'fc': '#a3a3a3', 'ec': '#32512b', 'lw': 0, 'zorder': 1},
'gleisbett': {'fc': '#ebdbe8', 'ec': '#32512b', 'lw': 0, 'zorder': 1},
'cemeterystuff': {'fc': '#7BAE82', 'ec': '#2F3737', 'lw': 0, 'zorder': 1},
},
osm_credit = {'color': '#3b4545'}
)
print("savefig")
plt.savefig('berlin.png')
|