encoding utf-8
source AndaraNorthMasterMaps.th
export map \
-layout overlay \
-layout-surface bottom \
-layout-surface-opacity 50 \
-o ../Outputs/AreaMaps/Andara_North_2026.pdf
#source AndaraSouthMasterMaps.th
#export map \
-layout overlay \
-layout-surface bottom \
-layout-surface-opacity 50 \
-o ../Outputs/AreaMaps/Andara_South_2026.pdf
##input the various layouts
input ..\XTherionFiles\_translations.txt # custom Spanish translations for legend
input ..\XTherionFiles\_layouts.mp # Allows scaling of Photos and makes water blue
input ..\XTherionFiles\_globallayouts.thc #allows the same symbols to be used across all surveys
layout custom_labels
code metapost
#push_label_fill_color(1.0, 0.9, 0.8);
% Redefine the boxed label macro
def p_boxedlabel(expr p) =
% Calculate dimensions based on text label
pair box_dim;
box_dim := (lfont_size*1.5, lfont_size*0.7); % Adjust padding
% Draw the filled background
pickup PenC;
% Change [1, 1, 0.8] to your desired RGB color (0-1)
#% Change [255, 255, 255] to your desired RGB color (0-1)
fill ((-.5*box_dim_x, -.5*box_dim_y) -- (.5*box_dim_x, -.5*box_dim_y) --
(.5*box_dim_x, .5*box_dim_y) -- (-.5*box_dim_x, .5*box_dim_y) -- cycle)
scaled 1.0 shifted p withcolor (1, 1, 0.8);
% Draw the border
draw ((-.5*box_dim_x, -.5*box_dim_y) -- (.5*box_dim_x, -.5*box_dim_y) --
(.5*box_dim_x, .5*box_dim_y) -- (-.5*box_dim_x, .5*box_dim_y) -- cycle)
scaled 1.0 shifted p;
% Draw the text label
p_label(p);
enddef;
endcode
code metapost
vardef p_label@#(expr txt,pos,rot,mode_) =
if known ATTR_label_mode:
mode := scantokens(ATTR_label_mode);
else:
mode := mode_;
fi;
if (mode=1) or (mode=7): interim labeloffset:=(u/8) fi;
lab:=thelabel@#(txt, pos);
if mode>1: pickup PenD fi;
if mode=1:
pickup pencircle scaled (u/6);
drawdot(pos);
process_label(pos,0);
elseif mode=2: process_uplabel;
elseif mode=3: process_downlabel;
elseif mode=4: process_updownlabel;
elseif mode=5: process_circledlabel;
elseif mode=6: process_boxedlabel;
elseif mode=7: process_label(pos,rot); % station name
elseif mode=8: process_filledlabel(pos, rot);
else: process_label(pos,rot); fi;
enddef;
endcode
endlayout
layout overlay
statistics topo off
statistics topo-length off
#symbol-hide point label
symbol-hide point rope
symbol-hide point section
symbol-hide line section
symbol-hide line label
symbol-hide line arrow
symbol-hide point gradient
scale 1 1500
base-scale 1 1500
map-header 80 90 w
map-image 92 90 w ..\XTherionFiles\TCP.png
#map-image 76 60 s ..\XTherionFiles\Overlays\Sobra_Urdon_Overlay_2021_2.jpg
#grid bottom
#grid-size 500 500 500 m
scale-bar 500 m
color map-fg [0 0 0] ##make caves black
#color map-fg altitude
color-legend off
#symbol-colour point label [100 100 100]
code metapost
fonts_setup(0.01,0.01,0.01,60,60);
##makes lower scales 'invisible'
endcode
### index of file options from _layouts.mp
copy custom_border
copy custom_snow
copy custom_flowstone
copy custom_scalebar
copy global_symbols
copy global_color
##HIDE LENGTH AND DEPTH
code tex-map
\cavelength={} %empty
\cavedepth={} %empty
\legendcontent={%
\hsize=\legendwidth
\ifnortharrow\vbox to 0pt{\line{\hfil\northarrow}\vss}\fi
\edef\tmp{\the\cavename} \ifx\tmp\empty \else
{\size[120]\the\cavename} \vskip1cm
\fi
\ifscalebar\scalebar\vskip1cm\fi
{\rightskip=0pt plus 3em\parskip=3bp
\edef\tmp{\the\comment} \ifx\tmp\empty \else
{\size[80]\the\comment} \par\medskip
\fi
\everypar{\hangindent=2em\hangafter=1}
\edef\tmp{\the\cavelength} \ifx\tmp\empty \else
{\size[60]\si\the\cavelengthtitle: \ss\the\cavelength\par}
\fi
\edef\tmp{\the\cavedepth} \ifx\tmp\empty \else
{\size[12]\si\the\cavedepthtitle: \ss\the\cavedepth\par}
\fi
\edef\tmp{\the\exploteam} \ifx\tmp\empty \else
{\size[60]\si\the\explotitle:
\ss\the\exploteam\quad\si\the\explodate\par}
\fi
\edef\tmp{\the\topoteam} \ifx\tmp\empty \else
{\size[60]\si\the\topotitle: \ss\the\topoteam\quad\si\the\topodate\par}
\fi
\edef\tmp{\the\cartoteam} \ifx\tmp\empty \else
{\size[60]\si\the\cartotitle:
\ss\the\cartoteam\quad\si\the\cartodate\par}
\fi
\edef\tmp{\the\copyrights} \ifx\tmp\empty \else
{\size[60]\ss\the\copyrights\par}
\fi
}
\formattedlegend
}
endcode
map-comment "Tresviso Caves Project www.tresvisocaves.info
BCRA Grade 5D
Data: cave-registry.org.uk/svn/Andara/"
doc-author "Phil Walker"
doc-keywords "Andara (North), Asturias-Cantabria, Spain"
doc-subject "Andara (North), Asturias-Cantabria, Spain, relationship of main caves 2025"
doc-title "Andara (North), Asturias-Cantabria, Spain Tresviso Caves Project 2025"
endlayout