-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGrottaDelFiume.thconfig
122 lines (100 loc) · 3.47 KB
/
GrottaDelFiume.thconfig
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
encoding utf-8
source index.th
input common.layout
layout altitude
scale-bar 150 m
# layout for map
copy map
overlap 0 cm
code metapost
def s_scalebar (expr l, units, txt) =
begingroup
tmpw = 3.0 bp;
tmp5m = 5 / Scale * units * cm;
tmpl = l / Scale * units * cm;
endgroup;
p := (0, 0) -- (tmpw, 0) -- (tmpw, - tmp5m) -- (0, - tmp5m) -- cycle;
pickup PenD;
for i := 0 step 1 until (l - 1) / 5:
if (i mod 2) <> 0:
unfill p shifted - (0, i * tmp5m);
else:
fill p shifted - (0, i * tmp5m);
fi;
draw p shifted - (0, i * tmp5m);
endfor;
pickup PenA
% draw (-tmpw, 0) -- (tmpw, 0);
% draw (-tmpw, -tmpl) -- (0, -tmpl);
fill (-2tmpw, tmpw) -- (-2tmpw, -tmpw) -- (0, 0) -- cycle;
fill (-2tmpw, -tmpl + tmpw) -- (-2tmpw, -tmpl + -tmpw) -- (0, -tmpl) -- cycle;
if ((l mod 10) > 5) or ((l mod 10) = 0):
draw (0, - tmpl) -- (tmpw, - tmpl) withcolor black;
else:
draw (0, - tmpl) -- (tmpw, - tmpl) withcolor white;
fi;
begingroup
interim labeloffset:=3.5bp + tmpw;
% interim defaultscale:=0.5;
label.rt(thTEX("\size[12]" & decimal (l) & "{\thinspace}m"),(0, 0));
for i := 1 step 1 until l / 5:
if ((i * 5) mod 10) = 0:
label.rt(thTEX("\size[12]" & "-\thinspace" & decimal (l - i * 5)),(0, - i * tmp5m));
else:
if i * 5 = l:
label.rt(thTEX("\size[12]" & "-\thinspace" & decimal (l - i * 5)),(0, - i * tmp5m));
else:
label.rt(thTEX("\size[8]" & "-\thinspace" & decimal (l - i * 5)),(0, - i * tmp5m));
fi
fi;
endfor;
if (l mod 5) <> 0:
label.rt(thTEX("\size[12]" & "-\thinspace0"),(0, - tmpl));
fi;
endgroup
enddef;
endcode
code tex-map
\def\maplayout{
\legendbox{0}{0}{SW}
{
\scalebar
}
}
endcode
endlayout
## MAPS ##
layout grotta_fiume_layout
doc-title "Grotta del Fiume"
scale 1 500
colour map-bg [80 80 80]
# Disattiva le etichette
symbol-hide point label
symbol-hide point height
# Disattiva le sezioni
symbol-hide point section
symbol-hide line section
symbol-hide line map-connection
# Disattiva i capisaldi
symbol-hide point station
symbol-hide line survey
endlayout
# PDF
export map -projection plan -layout print_centerline -layout grotta_fiume_layout -output "out/Grotta del Fiume - pianta.pdf"
export map -projection extended -layout altitude -layout grotta_fiume_layout -output "out/Grotta del Fiume - sezione.pdf"
export atlas -projection plan -layout grotta_fiume_layout -output "out/Grotta del Fiume - atlante - pianta.pdf"
# Google Earth
export map -projection plan -output "out/Grotta del Fiume - pianta.kml"
export model -output "out/Grotta del Fiume - poligonale.kml"
# Loch
export model -output "out/Grotta del Fiume.lox"
# Aven Survex - https://survex.com/
export model -output "out/Grotta del Fiume.3d"
# HTML
#export continuation-list -output "out/Grotta del Fiume - continuations.html"
# SQL
export database -output "out/Grotta del Fiume.sql"
# ESRI
export model \
-output "out/Grotta del Fiume - ESRI" \
-format esri # format statement explicitly required else pdf is produced regardless of extension