kopia lustrzana https://github.com/marceloprates/prettymaps
Fixed missing import (pyyaml) and supressed vsketch features due to difficulties in making setup.py install vsketch automatically
rodzic
3bcab3e4bb
commit
10d396065d
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"layers": {
|
||||
"streets": {
|
||||
"width": {
|
||||
"primary": 5,
|
||||
"secondary": 4,
|
||||
"tertiary": 3,
|
||||
"residential": 2,
|
||||
"footway": 1
|
||||
}
|
||||
},
|
||||
"building": {
|
||||
"tags": {
|
||||
"building": true
|
||||
}
|
||||
},
|
||||
"green": {
|
||||
"tags": {
|
||||
"landuse": [
|
||||
"grass",
|
||||
"village_green"
|
||||
],
|
||||
"leisure": "park"
|
||||
}
|
||||
}
|
||||
},
|
||||
"style": {
|
||||
"perimeter": {
|
||||
"draw": false
|
||||
},
|
||||
"streets": {
|
||||
"stroke": 1,
|
||||
"fill": 1,
|
||||
"penWidth": 2
|
||||
},
|
||||
"buildings": {
|
||||
"stroke": 2
|
||||
}
|
||||
},
|
||||
"circle": null,
|
||||
"radius": 500,
|
||||
"dilate": 100
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
{"layers": {"perimeter": {"circle": false}, "streets": {"width": {"primary": 5, "secondary": 4, "tertiary": 3, "residential": 2, "footway": 1}}, "building": {"tags": {"building": true}}, "green": {"tags": {"landuse": ["grass", "village_green"], "leisure": "park"}}}, "style": {"background": {"fc": "#F2F4CB", "ec": "#dadbc1", "hatch": "ooo...", "zorder": -1}, "perimeter": {"fill": false, "lw": 0, "zorder": 0}, "green": {"fc": "#8BB174", "ec": "#2F3737", "hatch_c": "#A7C497", "hatch": "ooo...", "lw": 1, "zorder": 1}, "water": {"fc": "#a8e1e6", "ec": "#2F3737", "hatch_c": "#9bc3d4", "hatch": "ooo...", "lw": 1, "zorder": 3}, "streets": {"fc": "#2F3737", "ec": "#475657", "alpha": 1, "lw": 0, "zorder": 4}, "building": {"palette": ["#433633", "#FF5E5B"], "ec": "#2F3737", "lw": 0.5, "zorder": 5}}, "circle": null, "radius": 500, "dilate": 100}
|
|
@ -0,0 +1,96 @@
|
|||
{
|
||||
"layers": {
|
||||
"streets": {
|
||||
"width": {
|
||||
"trunk": 6,
|
||||
"primary": 6,
|
||||
"secondary": 5,
|
||||
"tertiary": 4,
|
||||
"residential": 3.5,
|
||||
"pedestrian": 3,
|
||||
"footway": 3,
|
||||
"path": 3
|
||||
}
|
||||
},
|
||||
"building": {
|
||||
"tags": {
|
||||
"building": true,
|
||||
"leisure": [
|
||||
"track",
|
||||
"pitch"
|
||||
]
|
||||
}
|
||||
},
|
||||
"water": {
|
||||
"tags": {
|
||||
"natural": [
|
||||
"water",
|
||||
"bay"
|
||||
]
|
||||
}
|
||||
},
|
||||
"park": {
|
||||
"tags": {
|
||||
"leisure": "park"
|
||||
}
|
||||
},
|
||||
"forest": {
|
||||
"tags": {
|
||||
"landuse": "forest"
|
||||
}
|
||||
},
|
||||
"garden": {
|
||||
"tags": {
|
||||
"leisure": "garden"
|
||||
}
|
||||
}
|
||||
},
|
||||
"style": {
|
||||
"perimeter": {
|
||||
"fill": false,
|
||||
"lw": 0,
|
||||
"zorder": 0
|
||||
},
|
||||
"park": {
|
||||
"fc": "#AABD8C",
|
||||
"ec": "#87996b",
|
||||
"lw": 1,
|
||||
"zorder": 1
|
||||
},
|
||||
"forest": {
|
||||
"fc": "#78A58D",
|
||||
"ec": "#658a76",
|
||||
"lw": 1,
|
||||
"zorder": 1
|
||||
},
|
||||
"garden": {
|
||||
"fc": "#a9d1a9",
|
||||
"ec": "#8ab58a",
|
||||
"lw": 1,
|
||||
"zorder": 1
|
||||
},
|
||||
"water": {
|
||||
"fc": "#92D5F2",
|
||||
"ec": "#6da8c2",
|
||||
"lw": 1,
|
||||
"zorder": 2
|
||||
},
|
||||
"streets": {
|
||||
"fc": "#F1E6D0",
|
||||
"ec": "#2F3737",
|
||||
"lw": 1.5,
|
||||
"zorder": 3
|
||||
},
|
||||
"building": {
|
||||
"palette": [
|
||||
"#fff"
|
||||
],
|
||||
"ec": "#2F3737",
|
||||
"lw": 1,
|
||||
"zorder": 4
|
||||
}
|
||||
},
|
||||
"circle": null,
|
||||
"radius": null,
|
||||
"dilate": 0
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
{
|
||||
"layers": {
|
||||
"perimeter": {},
|
||||
"streets": {
|
||||
"width": {
|
||||
"motorway": 5,
|
||||
"trunk": 5,
|
||||
"primary": 4.5,
|
||||
"secondary": 4,
|
||||
"tertiary": 3.5,
|
||||
"cycleway": 3.5,
|
||||
"residential": 3,
|
||||
"service": 2,
|
||||
"unclassified": 2,
|
||||
"pedestrian": 2,
|
||||
"footway": 1
|
||||
}
|
||||
},
|
||||
"building": {
|
||||
"tags": {
|
||||
"building": true,
|
||||
"landuse": "construction"
|
||||
}
|
||||
},
|
||||
"water": {
|
||||
"tags": {
|
||||
"natural": [
|
||||
"water",
|
||||
"bay"
|
||||
]
|
||||
}
|
||||
},
|
||||
"forest": {
|
||||
"tags": {
|
||||
"landuse": "forest"
|
||||
}
|
||||
},
|
||||
"green": {
|
||||
"tags": {
|
||||
"landuse": [
|
||||
"grass",
|
||||
"orchard"
|
||||
],
|
||||
"natural": [
|
||||
"island",
|
||||
"wood"
|
||||
],
|
||||
"leisure": "park"
|
||||
}
|
||||
},
|
||||
"beach": {
|
||||
"tags": {
|
||||
"natural": "beach"
|
||||
}
|
||||
},
|
||||
"parking": {
|
||||
"tags": {
|
||||
"amenity": "parking",
|
||||
"highway": "pedestrian",
|
||||
"man_made": "pier"
|
||||
}
|
||||
}
|
||||
},
|
||||
"style": {
|
||||
"perimeter": {
|
||||
"fill": false,
|
||||
"lw": 0,
|
||||
"zorder": 0
|
||||
},
|
||||
"background": {
|
||||
"fc": "#F2F4CB",
|
||||
"zorder": -1
|
||||
},
|
||||
"green": {
|
||||
"fc": "#8BB174",
|
||||
"ec": "#2F3737",
|
||||
"hatch_c": "#A7C497",
|
||||
"hatch": "ooo...",
|
||||
"lw": 1,
|
||||
"zorder": 1
|
||||
},
|
||||
"forest": {
|
||||
"fc": "#64B96A",
|
||||
"ec": "#2F3737",
|
||||
"lw": 1,
|
||||
"zorder": 2
|
||||
},
|
||||
"water": {
|
||||
"fc": "#a8e1e6",
|
||||
"ec": "#2F3737",
|
||||
"hatch_c": "#9bc3d4",
|
||||
"hatch": "ooo...",
|
||||
"lw": 1,
|
||||
"zorder": 3
|
||||
},
|
||||
"beach": {
|
||||
"fc": "#FCE19C",
|
||||
"ec": "#2F3737",
|
||||
"hatch_c": "#d4d196",
|
||||
"hatch": "ooo...",
|
||||
"lw": 1,
|
||||
"zorder": 3
|
||||
},
|
||||
"parking": {
|
||||
"fc": "#F2F4CB",
|
||||
"ec": "#2F3737",
|
||||
"lw": 1,
|
||||
"zorder": 3
|
||||
},
|
||||
"streets": {
|
||||
"fc": "#2F3737",
|
||||
"ec": "#475657",
|
||||
"alpha": 1,
|
||||
"lw": 0,
|
||||
"zorder": 4
|
||||
},
|
||||
"building": {
|
||||
"palette": [
|
||||
"#433633",
|
||||
"#FF5E5B"
|
||||
],
|
||||
"ec": "#2F3737",
|
||||
"lw": 0.5,
|
||||
"zorder": 5
|
||||
}
|
||||
},
|
||||
"circle": null,
|
||||
"radius": 500
|
||||
}
|
|
@ -0,0 +1,130 @@
|
|||
{
|
||||
"layers": {
|
||||
"perimeter": {},
|
||||
"streets": {
|
||||
"width": {
|
||||
"motorway": 5,
|
||||
"trunk": 5,
|
||||
"primary": 4.5,
|
||||
"secondary": 4,
|
||||
"tertiary": 3.5,
|
||||
"cycleway": 3.5,
|
||||
"residential": 3,
|
||||
"service": 2,
|
||||
"unclassified": 2,
|
||||
"pedestrian": 2,
|
||||
"footway": 1
|
||||
}
|
||||
},
|
||||
"building": {
|
||||
"tags": {
|
||||
"building": true,
|
||||
"landuse": "construction"
|
||||
}
|
||||
},
|
||||
"water": {
|
||||
"tags": {
|
||||
"natural": [
|
||||
"water",
|
||||
"bay"
|
||||
]
|
||||
}
|
||||
},
|
||||
"forest": {
|
||||
"tags": {
|
||||
"landuse": "forest"
|
||||
}
|
||||
},
|
||||
"green": {
|
||||
"tags": {
|
||||
"landuse": [
|
||||
"grass",
|
||||
"orchard"
|
||||
],
|
||||
"natural": [
|
||||
"island",
|
||||
"wood"
|
||||
],
|
||||
"leisure": "park"
|
||||
}
|
||||
},
|
||||
"beach": {
|
||||
"tags": {
|
||||
"natural": "beach"
|
||||
}
|
||||
},
|
||||
"parking": {
|
||||
"tags": {
|
||||
"amenity": "parking",
|
||||
"highway": "pedestrian",
|
||||
"man_made": "pier"
|
||||
}
|
||||
}
|
||||
},
|
||||
"style": {
|
||||
"perimeter": {
|
||||
"fill": false,
|
||||
"lw": 0,
|
||||
"zorder": 0
|
||||
},
|
||||
"background": {
|
||||
"fc": "#F2F4CB",
|
||||
"zorder": -1
|
||||
},
|
||||
"green": {
|
||||
"fc": "#8BB174",
|
||||
"ec": "#2F3737",
|
||||
"hatch_c": "#A7C497",
|
||||
"hatch": "ooo...",
|
||||
"lw": 1,
|
||||
"zorder": 1
|
||||
},
|
||||
"forest": {
|
||||
"fc": "#64B96A",
|
||||
"ec": "#2F3737",
|
||||
"lw": 1,
|
||||
"zorder": 2
|
||||
},
|
||||
"water": {
|
||||
"fc": "#a8e1e6",
|
||||
"ec": "#2F3737",
|
||||
"hatch_c": "#9bc3d4",
|
||||
"hatch": "ooo...",
|
||||
"lw": 1,
|
||||
"zorder": 3
|
||||
},
|
||||
"beach": {
|
||||
"fc": "#FCE19C",
|
||||
"ec": "#2F3737",
|
||||
"hatch_c": "#d4d196",
|
||||
"hatch": "ooo...",
|
||||
"lw": 1,
|
||||
"zorder": 3
|
||||
},
|
||||
"parking": {
|
||||
"fc": "#F2F4CB",
|
||||
"ec": "#2F3737",
|
||||
"lw": 1,
|
||||
"zorder": 3
|
||||
},
|
||||
"streets": {
|
||||
"fc": "#2F3737",
|
||||
"ec": "#475657",
|
||||
"alpha": 1,
|
||||
"lw": 0,
|
||||
"zorder": 4
|
||||
},
|
||||
"building": {
|
||||
"palette": [
|
||||
"#433633",
|
||||
"#FF5E5B"
|
||||
],
|
||||
"ec": "#2F3737",
|
||||
"lw": 0.5,
|
||||
"zorder": 5
|
||||
}
|
||||
},
|
||||
"circle": null,
|
||||
"radius": 800,
|
||||
"dilate": 100
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
{
|
||||
"layers": {
|
||||
"perimeter": {},
|
||||
"streets": {
|
||||
"custom_filter": "[\"highway\"~\"motorway|trunk|primary|secondary|tertiary|residential|service|unclassified|pedestrian|footway\"]",
|
||||
"width": {
|
||||
"motorway": 5,
|
||||
"trunk": 5,
|
||||
"primary": 4.5,
|
||||
"secondary": 4,
|
||||
"tertiary": 3.5,
|
||||
"residential": 3,
|
||||
"service": 2,
|
||||
"unclassified": 2,
|
||||
"pedestrian": 2,
|
||||
"footway": 1
|
||||
}
|
||||
},
|
||||
"building": {
|
||||
"tags": {
|
||||
"building": true,
|
||||
"landuse": "construction"
|
||||
},
|
||||
"union": false
|
||||
},
|
||||
"water": {
|
||||
"tags": {
|
||||
"natural": [
|
||||
"water",
|
||||
"bay"
|
||||
]
|
||||
}
|
||||
},
|
||||
"green": {
|
||||
"tags": {
|
||||
"landuse": "grass",
|
||||
"natural": [
|
||||
"island",
|
||||
"wood"
|
||||
],
|
||||
"leisure": "park"
|
||||
}
|
||||
},
|
||||
"forest": {
|
||||
"tags": {
|
||||
"landuse": "forest"
|
||||
}
|
||||
},
|
||||
"parking": {
|
||||
"tags": {
|
||||
"amenity": "parking",
|
||||
"highway": "pedestrian",
|
||||
"man_made": "pier"
|
||||
}
|
||||
}
|
||||
},
|
||||
"style": {
|
||||
"background": {
|
||||
"fc": "#F2F4CB",
|
||||
"ec": "#dadbc1",
|
||||
"hatch": "ooo...",
|
||||
"zorder": -1
|
||||
},
|
||||
"perimeter": {
|
||||
"fc": "#F2F4CB",
|
||||
"ec": "#dadbc1",
|
||||
"lw": 0,
|
||||
"hatch": "ooo...",
|
||||
"zorder": 0
|
||||
},
|
||||
"green": {
|
||||
"fc": "#D0F1BF",
|
||||
"ec": "#2F3737",
|
||||
"lw": 1,
|
||||
"zorder": 1
|
||||
},
|
||||
"forest": {
|
||||
"fc": "#64B96A",
|
||||
"ec": "#2F3737",
|
||||
"lw": 1,
|
||||
"zorder": 1
|
||||
},
|
||||
"water": {
|
||||
"fc": "#a1e3ff",
|
||||
"ec": "#2F3737",
|
||||
"hatch": "ooo...",
|
||||
"hatch_c": "#85c9e6",
|
||||
"lw": 1,
|
||||
"zorder": 2
|
||||
},
|
||||
"parking": {
|
||||
"fc": "#F2F4CB",
|
||||
"ec": "#2F3737",
|
||||
"lw": 1,
|
||||
"zorder": 3
|
||||
},
|
||||
"streets": {
|
||||
"fc": "#2F3737",
|
||||
"ec": "#475657",
|
||||
"alpha": 1,
|
||||
"lw": 0,
|
||||
"zorder": 3
|
||||
},
|
||||
"building": {
|
||||
"palette": [
|
||||
"#FFC857",
|
||||
"#E9724C",
|
||||
"#C5283D"
|
||||
],
|
||||
"ec": "#2F3737",
|
||||
"lw": 0.5,
|
||||
"zorder": 4
|
||||
}
|
||||
},
|
||||
"circle": true,
|
||||
"radius": 1100,
|
||||
"dilate": 0
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"layers": {
|
||||
"perimeter": {},
|
||||
"streets": {
|
||||
"width": {
|
||||
"motorway": 5,
|
||||
"trunk": 5,
|
||||
"primary": 4,
|
||||
"secondary": 3,
|
||||
"tertiary": 2,
|
||||
"residential": 2
|
||||
}
|
||||
},
|
||||
"building": {
|
||||
"tags": {
|
||||
"building": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"style": {
|
||||
"perimeter": {
|
||||
"fill": false,
|
||||
"lw": 0,
|
||||
"zorder": 0
|
||||
},
|
||||
"background": {
|
||||
"fc": "#fff",
|
||||
"zorder": -1
|
||||
},
|
||||
"streets": {
|
||||
"fc": "#000",
|
||||
"lw": 0,
|
||||
"zorder": 4
|
||||
},
|
||||
"building": {
|
||||
"fc": "#fff",
|
||||
"ec": "#000",
|
||||
"lw": 0.5,
|
||||
"zorder": 5
|
||||
}
|
||||
},
|
||||
"circle": null,
|
||||
"radius": 400
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
{"layers": {"perimeter": {}, "streets": {"width": {"motorway": 12, "trunk": 12, "primary": 11, "secondary": 10, "tertiary": 9, "residential": 8}}, "park": {"tags": {"leisure": "nature_reserve", "landuse": "military", "boundary": "protected_area", "place": "square", "natural": "grassland", "amenity": "hospital"}}, "grass": {"tags": {"landuse": "grass", "natural": "wood"}}, "wetland": {"tags": {"natural": "scrub"}}, "beach": {"tags": {"natural": "beach"}}, "water": {"tags": {"natural": "water"}}, "pedestrian": {"tags": {"area:highway": "pedestrian"}}, "building": {"tags": {"building": true}}}, "style": {"perimeter": {"ec": "#0F110C", "fill": false, "lw": 0}, "park": {"fc": "#AAD897", "ec": "#8bc49e", "lw": 0, "zorder": 1, "hatch": "ooo..."}, "grass": {"fc": "#72C07A", "ec": "#64a38d", "lw": 0, "zorder": 1, "hatch": "ooo..."}, "wetland": {"fc": "#D2D68D", "ec": "#AEB441", "lw": 0, "zorder": 3, "hatch": "ooo..."}, "water": {"fc": "#6CCFF6", "ec": "#59adcf", "lw": 0, "zorder": 2, "hatch": "ooo..."}, "beach": {"fc": "#F2E3BC", "ec": "#EBD499", "lw": 0, "zorder": 2, "hatch": "ooo..."}, "pedestrian": {"fc": "#7BC950", "ec": "#638475", "lw": 0, "zorder": 2, "hatch": "ooo..."}, "streets": {"fc": "#898989", "ec": "#706f6f", "zorder": 3, "lw": 0, "hatch": "ooo..."}, "building": {"fc": "#E7A89C", "ec": "#E7A89C", "lw": 0, "zorder": 0}}, "circle": null, "radius": null, "dilate": 0}
|
|
@ -22,7 +22,7 @@ import re
|
|||
import os
|
||||
import json
|
||||
import yaml
|
||||
import vsketch
|
||||
#import vsketch
|
||||
import IPython
|
||||
import warnings
|
||||
import matplotlib
|
||||
|
@ -192,7 +192,8 @@ def plot_gdf(
|
|||
gdf: gp.GeoDataFrame,
|
||||
ax: matplotlib.axes.Axes,
|
||||
mode: str = 'matplotlib',
|
||||
vsk: Optional[vsketch.SketchClass] = None,
|
||||
#vsk: Optional[vsketch.SketchClass] = None,
|
||||
vsk=None,
|
||||
palette: Optional[List[str]] = None,
|
||||
width: Optional[Union[dict, float]] = None,
|
||||
union: bool = False,
|
||||
|
@ -925,6 +926,7 @@ def plot(
|
|||
# 8. Draw layers
|
||||
if mode == "plotter":
|
||||
# 8.1. Draw layers in plotter (vsketch) mode
|
||||
'''
|
||||
class Sketch(vsketch.SketchClass):
|
||||
|
||||
def draw(self, vsk: vsketch.Vsketch):
|
||||
|
@ -953,6 +955,7 @@ def plot(
|
|||
|
||||
sketch = Sketch()
|
||||
sketch.display()
|
||||
'''
|
||||
elif mode == "matplotlib":
|
||||
# 8.2. Draw layers in matplotlib mode
|
||||
for layer in gdfs:
|
||||
|
|
|
@ -2,4 +2,5 @@ osmnx==1.2.1
|
|||
tabulate==0.8.9
|
||||
Shapely>=1.8,<2.0
|
||||
descartes==1.1.0
|
||||
ipykernel==6.15.1
|
||||
ipykernel==6.15.1
|
||||
pyyaml==6.0.0
|
Ładowanie…
Reference in New Issue